开发者

Does rails store data relationships in the database?

开发者 https://www.devze.com 2023-01-06 08:20 出处:网络
When using relationships in rails are they stored in the database so all foreign keys are stored in the tables and such like or are all relationships controlled v开发者_C百科ia the software?

When using relationships in rails are they stored in the database so all foreign keys are stored in the tables and such like or are all relationships controlled v开发者_C百科ia the software?

Thanks in Advance

Dean


The foreign keys are stored in the tables. The has_many and belongs_to declarations in the models are only there to create the attributes used to access the relationships.

0

精彩评论

暂无评论...
验证码 换一张
取 消