Hi, Posting here since issue tracking isn''t the best place to discuss. I can understand habtm is moving towards deprecating support for extra attributes in join_table, and to use :through for those cases instead. To clarify, patch<http://dev.rubyonrails.org/attachment/ticket/5216/habtm_join_table_test.patch1.diff>for #5216 <http://dev.rubyonrails.org/ticket/5216> wasn''t looking to support populating extra attributes in join table. But rather, it was meant to make habtm resilient against existence of extra attributes messing up with the expected, normal operations of habtm - after ur classes are setup with habtm, they''ll continue to run nicely even if schema has to change on join_table. Cheers -- choonkeat _______________________________________________ Rails-core mailing list Rails-core@lists.rubyonrails.org http://lists.rubyonrails.org/mailman/listinfo/rails-core
> I can understand habtm is moving towards deprecating support for extra > attributes in join_table, and to use :through for those cases instead. > > To clarify, patch for #5216 wasn''t looking to support populating extra > attributes in join table. But rather, it was meant to make habtm resilient > against existence of extra attributes messing up with the expected, normal > operations of habtm - after ur classes are setup with habtm, they''ll > continue to run nicely even if schema has to change on join_table.Sadly, HABTM has to support those ''rich attributes''. Pulling in those values is a ''feature'' not a bug. The consequence of this is that HABTM cannot support join tables with a column called id. -- Cheers Koz
> Sadly, HABTM has to support those ''rich attributes''. Pulling in > those values is a ''feature'' not a bug. The consequence of this is > that HABTM cannot support join tables with a column called id.Just a thought, but adding this patch might be way to transition folks from habtm to has_many :through and join models. -- Rick Olson http://techno-weenie.net
On 5/31/06, Michael Koziarski <michael@koziarski.com> wrote:>> Sadly, HABTM has to support those ''rich attributes''. Pulling in > those values is a ''feature'' not a bug. The consequence of this is > that HABTM cannot support join tables with a column called id. >Regardless of whether its a feature, bug or deprecated, the current state of having it (imho, unnecessarily) behaving differently in the presence/absence of an ''id'' column feels wrong. No? On 5/31/06, Rick Olson <technoweenie@gmail.com> wrote:> Just a thought, but adding this patch might be way to transition folks > from habtm to has_many :through and join models.But hmt doesn''t have the slick associative arrays like habtm :-( -- choonkeat http://blog.yanime.org/ http://www.rssfwd.com/