July 2009
1 post
1 tag
Hibernate OneToMany Annotations
As it was hard for me to find a clear example of a OneToMany join using Hibernate annotations in Java the other day, I decided to write this up.
This is an example of a unidirectional OneToMany join in Java using Hibernate. The JoinColumn name is a foreign key in the Message table. This will allow access to the Set of the messages that have been sent to the particular user. It automatically joins...