Hi folks,
From what I can gather so far Hibernate expects the joining table in the middle of a many-to-many to have a simple structure of an ID, and two foreign keys, one from each side of the relationship.
I'm trying to map a many-to-many between a Person table, and a Photo table. The joining table is PersonPhoto table, which has the standard three columns. It's currently working just fine.
Now I'd like to add an extra column in the PersonPhoto field to hold descriptive notes. For example, a Person record for Bob is associated to Photo1 record in Photo. For the record in the joining table I'd like to have a note which may say something like "Bob is in the middle row, third from the right".
Can someone please help me with this? I'm not even sure where to start looking. Where do I put the Note property? and how would I annotate it?
Any assistance would be greatly appreciated.
Many thanks,
Dany.
|