Skip to content

Add Sequelize#model to fetch DAOFactory of previously defined model#868

Merged
sdepold merged 1 commit intosequelize:masterfrom
jwilm:model-accessor
Sep 1, 2013
Merged

Add Sequelize#model to fetch DAOFactory of previously defined model#868
sdepold merged 1 commit intosequelize:masterfrom
jwilm:model-accessor

Conversation

@jwilm
Copy link
Copy Markdown
Contributor

@jwilm jwilm commented Aug 30, 2013

This provides some basic currying to the user for fetching DAOFactorys. I would update the docs too if I could figure out how they're generated.

lib/sequelize.js Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Curly braces please :)

@jwilm
Copy link
Copy Markdown
Contributor Author

jwilm commented Aug 30, 2013

Oh shoot, not at all. I had the bind before I looked around and noticed the repository typically defines self = this. Will push an update shortly...

@durango
Copy link
Copy Markdown
Member

durango commented Aug 30, 2013

No worries man, sorry for being nitpicky :( other than that very cool :D and thanks!

@jwilm
Copy link
Copy Markdown
Contributor Author

jwilm commented Aug 30, 2013

No problem! I understand wanting consistent code style within a project. Incidentally, that is how I accidentally ended up with that self = this and .bind(this) for the same function call.

The updates you requested are incorporated - not sure what sort of notification you get when I amend to the commit of a pull request.

@sdepold
Copy link
Copy Markdown
Member

sdepold commented Sep 1, 2013

@jwilm we mostly skip the .bind calls because if performance. its sad, but defining a variable which reflects this is still way faster than .binding a function :(

@sdepold
Copy link
Copy Markdown
Member

sdepold commented Sep 1, 2013

and thanks for the PR :)

sdepold added a commit that referenced this pull request Sep 1, 2013
Add Sequelize#model to fetch DAOFactory of previously defined model
@sdepold sdepold merged commit a1adbad into sequelize:master Sep 1, 2013
@jwilm jwilm deleted the model-accessor branch September 1, 2013 14:45
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.

3 participants