chaitanya_r wrote:
I am new to Hibernate and learning Hibernate using the hibernate documentation (http://docs.jboss.org/hibernate/orm/3.3/reference/en-US/html/associations.html#assoc-unidirectional-12m) and going through the one-to-many and many-to-one associations without using Join tables. The document says that:
Many-to-One
A unidirectional many-to-one association is the most common kind of unidirectional association.
One-to-Many
A unidirectional one-to-many association on a foreign key is an unusual case, and is not recommended.
Why the document recommends not use one-to-many associations? Please help me in understanding this?
Also the document says that the association for many-to-one with join table is used when the association is optional. What does it mean when it says the association is optional?
Many-to-one
A unidirectional many-to-one association on a join table is common when the association is optional.
Please help me in understanding the concepts.
Thanks for your post, I could use assistance here as well. What is the comment that association is optional refer to? I'm lost there. thank you.