Sails.js - Is there intended support for a “one-way-many” association

≡放荡痞女 提交于 2019-12-02 01:40:12

I think you should be ok.

However, there does not really seem any reason to not complete the association for a Many to Many. The reason would be because everything is already being created for that single collection. The join table and its attributes are already there. The only thing missing in this equation is the reference back on food.

I could understand if putting the association on food were to create another table or create another weird join, but that has already been done. There really is no overhead to creating the other association.

So in theory you might as well create it, thus avoiding any potential conflicts unless you have a really compelling reason not to?

Edited: Based on the comments below we should note that one could experience overhead in lift based the blueprints and dynamic finders created.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!