This repository has been archived by the owner. It is now read-only.

hasMany association can specify collection name in options #75

Merged
merged 3 commits into from Sep 20, 2012

Conversation

Projects
None yet
2 participants
@Gamaroff
Contributor

Gamaroff commented Sep 20, 2012

This adds the ability to add a collection name to the options so that it is not required that the 3rd table which defines the association is defined in the form:

model + "_" + association

Options can now define a property thus:

{ collection: 'collection_name'}

Gamaroff added some commits Sep 20, 2012

Update lib/associations/many.js
Added the ability to pass an association collection name to the options in the form:
{ autoFetch:true, association: '[collection_name]' }
Update lib/associations/many.js
Association collection name passed into options
Update lib/associations/many.js
Renamed collection name in options
@dresende

This comment has been minimized.

Show comment Hide comment
@dresende

dresende Sep 20, 2012

Owner

Thank you for your contribution! :)

Owner

dresende commented Sep 20, 2012

Thank you for your contribution! :)

dresende added a commit that referenced this pull request Sep 20, 2012

Merge pull request #75 from Gamaroff/master
hasMany association can specify collection name in options

@dresende dresende merged commit 74a6d41 into dresende:master Sep 20, 2012

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.