Properties in link tables

38 views
Skip to first unread message

Samuel W. Knowlton

unread,
Jul 29, 2012, 12:34:51 PM7/29/12
to cf-or...@googlegroups.com
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

Matt Quackenbush

unread,
Jul 29, 2012, 12:40:27 PM7/29/12
to cf-or...@googlegroups.com
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.

Samuel W. Knowlton

unread,
Jul 29, 2012, 12:41:37 PM7/29/12
to cf-or...@googlegroups.com
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

Matt Quackenbush

unread,
Jul 29, 2012, 12:51:46 PM7/29/12
to cf-or...@googlegroups.com
No problem. Always glad to help. :-)
Reply all
Reply to author
Forward
0 new messages