Class Index | File Index

## Classes

- _Association
- _global_
- Dataset
- ManyToMany
- ManyToOne
- MayToOne
- Migrations
- Model
- moose
- moose.adapters
- moose.adapters.client.Client
- moose.adapters.client.ConnectionPool
- moose.adapters.client.mysql.ConnectionPool
- moose.adapters.client.mysql.Query
- moose.adapters.client.mysql.TransactionQuery
- moose.adapters.mysql
- moose.adapters.mysql.types
- moose.plugins
- moose.plugins.AssociationPlugin
- moose.plugins.CachePlugin
- moose.plugins.QueryPlugin
- moose.plugins.TimeStampPlugin
- moose.Table
- OneToMany
- SQL
- Type

# Class OneToMany

Extends _Association.
Class to define a one to many association. NOT to be instantiated directly Its just documented for reference.
Defined in: oneToMany.js.

Class Summary
Constructor Attributes | Constructor Name and Description
--- | ---
| OneToMany()

Fields borrowed from class _Association:
  fetchType, filter, leftKey, model, orderBy, rightKey

Method Summary
Method Attributes | Method Name and Description
--- | ---
| diff(next, reference) Compares our associtaion and handle any creation, removal, reloading of the associated model.
| inject(parent, name) SEE _Association#inject.

Methods borrowed from class _Association:
  fetch, isEager

Class Detail
OneToMany()
Method Detail
diff(next, reference)
Compares our associtaion and handle any creation, removal, reloading of the associated model.

Parameters:
{Function} next
  funciton to call to pass control up the middleware chain.
{Object} reference
  to the acting association class.

inject(parent, name)
SEE _Association#inject. Adds the following methods to each model.

- add<ModelName> - add an association
- add<ModelsName>s - add multiple associations
- remove<ModelName> - remove an association
- splice<ModelName>s - splice a number of associations

Parameters:
parent
name

Documentation generated by JsDoc Toolkit 2.4.0 on Sat Jun 11 2011 03:16:40 GMT-0500 (CDT)