I’m not positive I’m asking the right question, but based on tonight’s Imposter Syndrome talks at boston.rb, I’m forging ahead…
I often see has_many :through recommended over has_and_belongs_to_many. I understand the reasoning: usually the relationship has (or will have) additional attributes that need to be represented.
It feels like the same logic for avoiding HABTM should apply to belongs_to. I have a CaseFile that belongs_to a health-care Practitioner. If the CaseFile had multiple Practitioners (a HABTM relationship), the wisdom would advise me to use HMT from the start, since I’ll eventually need attributes on the relationship. By the same logic, I should skip the belongs_to phase and use HMT for the inevitable relationship attributes.
Is there some difference between the two cases, or have I been missing all the blog posts recommending HMT over BT?