开发者

Rails: HABTM Relationship with id as Primary Key, legacy DB

开发者 https://www.devze.com 2023-02-18 02:33 出处:网络
I have a legacy DB with join tables that have I开发者_开发问答Ds as primary keys... Is there anything I can do?

I have a legacy DB with join tables that have I开发者_开发问答Ds as primary keys... Is there anything I can do?

Thanks!


Instead of has_and_belongs_to_many, use

has_many :whatevers, :through => :habtm_table
0

精彩评论

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