1. Duplicate results despite using CollectionId annotation forum.hibernate.orgNewbie Joined: Sun Sep 26, 2010 5:23 am Posts: 7 Hi, I have a simple model where a Parent has a unidirectional ManyToMany relation with a Child and the child has a unidirectional OneToMany relation with a Toy. The ManyToMany relation is (obviously) via a join table, which has a surrogate PK that is used for the CollectionID, and the OneToMany ... |
2. CollectionId annotation problem. Help!! forum.hibernate.orgHello All I am trying to create a idbag using annotation. Here is the code: @org.hibernate.annotations.CollectionOfElements @org.hibernate.annotations.CollectionId( columns = @Column(name = "collId"), type = @org.hibernate.annotations.Type(type = "int"), generator = "int" ) @JoinTable( name="OwnerCollection", joinColumns={@JoinColumn(name="FK_ownerId")} ) @Column(name="collStr") public Collection |