blog.depold.com |
Web programming to the rescue! A blog about Node.JS, JavaScript and Ruby on Rails! |
stumblmumbl asked: Hi, in Sequelize JS is it possible to refer to a model twice from another model? For example, if in Project I would like one User reference for the Manager, and another for the Lead Developer. How would I do that in Sequelize?
Hi!
Yes this is possible. You have to add the ‘as’-option to your definition. Take a look at this part of the documentation.
Hope that helps