Properties in link tables

Showing 1-4 of 4 messages
Properties in link tables Samuel W. Knowlton 7/29/12 9:34 AM
Hi,

Just a quick question that I couldn't figure out how to search for, so apologies if this has come up before.

I have a table of users and a table of certifications. The user entity has a certification property that uses a user_certifications table as its linktable. Everything works great.

My question is: what if i have properties on the join table relating to a particular instance of a user having a certification, e.g. the date of the certification?

Is the answer to just re-do the model to include UserCertification as an intermediary entity and scrap the direct relationship between User and Certification? Or, in other words, only use link tables when the relationship has no intermediary properties?

Thanks!
Sam
Re: [cf-orm-dev] Properties in link tables QuackFuzed 7/29/12 9:40 AM
In short, yes.

Rather than having the m2m relationship(s), you'd end up with the intermediary UserCertificiation entity, which would have an m2o relationship with User and an m2o relationship with Certification. It's relatively unlikely that you'd want an o2m to UserCertification on both User and Certification, but certainly doable.

HTH


--
You received this message because you are subscribed to the Google Groups "cf-orm-dev" group.
To view this discussion on the web visit https://groups.google.com/d/msg/cf-orm-dev/-/EWmlLlNYImAJ.
To post to this group, send email to cf-or...@googlegroups.com.
To unsubscribe from this group, send email to cf-orm-dev+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/cf-orm-dev?hl=en.

Re: [cf-orm-dev] Properties in link tables Samuel W. Knowlton 7/29/12 9:41 AM
Cool. I suspected that might be the case but am still n00b enough that it's good to hear it from the pros. This list is great!

Thanks again,
Sam--
Samuel W. Knowlton
Chief Leagueologist
inLeague * s...@inleague.org
http://www.inleague.org
Office: 512.814.8022

Re: [cf-orm-dev] Properties in link tables QuackFuzed 7/29/12 9:51 AM
No problem. Always glad to help. :-)