Tag: jpa
-
Hibernate/JPA Ternary Relationships
After much pain and suffering trying to get ternary relationships working correctly using the JPA annotations, I finally hit upon this post. The secret sauce: it makes use of the (rather poorly documented) @CollectionOfElements Hibernate annotation to annotate the set of link objects in the primary class, and makes the link class @Embeddable. No primary…