Skip to content

Added HasMany#injectCreator and Model.createAssociatedModel()#1213

Merged
mickhansen merged 7 commits intosequelize:masterfrom
saschagehlich:feature/create-relation-objects
Jan 8, 2014
Merged

Added HasMany#injectCreator and Model.createAssociatedModel()#1213
mickhansen merged 7 commits intosequelize:masterfrom
saschagehlich:feature/create-relation-objects

Conversation

@saschagehlich
Copy link
Copy Markdown
Contributor

No description provided.

@saschagehlich
Copy link
Copy Markdown
Contributor Author

Also, renamed the HasManyMultiLinked variable to HasManyDoubleLinked

@mickhansen
Copy link
Copy Markdown
Contributor

Good work, eventually we'll probably want to add createAssociatedModels and perhaps add it to belongsTo/hasOne aswell. But might aswell merge this now.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to pass on the transaction option here - Or transactions wont work with createAssociatonModel

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.addAssociation does not support transactions, so .createAssociation can't support them either (opened a ticket #1215, maybe I'll fix this today)

@mickhansen
Copy link
Copy Markdown
Contributor

Beautiful work.

mickhansen added a commit that referenced this pull request Jan 8, 2014
…bjects

Added HasMany#injectCreator and Model.createAssociatedModel()
@mickhansen mickhansen merged commit c5ec427 into sequelize:master Jan 8, 2014
@saschagehlich saschagehlich deleted the feature/create-relation-objects branch January 8, 2014 12:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants