Hi,
I've been looking for the best way to model a relation between two entities
carrying attributes and did note really thing anything clear (to me at least).
For instance, given a User entities and a Newspaper, what would be my
options to model a subscription ? Basically the subscription is a relation that
carry a start_date and an end_date attribute.
So I see so far two way to do it :
* mapping three classes with one-to-many : User, Subscription and
Newspaper.
* Employee - Employment - Organization mapping style as explain at the
end of the chapter 7.6 of the Hibernate3 Reference manual. (althought that
exemple is not very clear to me. Is it bi-dirretional ?)
I think that M-N relations carrying attributes are not that uncommon. Maybe
it could be explained better in the manual. Or I am missing something ?
|