Hibernate 3.2.3
I've object "Obj" which has Set of constrains "ObjConstrain"
This is fragment of Obj.class
Code:
@org.hibernate.annotations.CollectionOfElements
@JoinTable(name = "T_OBJECTCONSTRAINT",
joinColumns = @JoinColumn(name = "OBJECT_ID"))
@org.hibernate.annotations.CollectionId(
columns = {@Column(name = "OBJECT_ID"),
@Column(name = "CONSTRAIN_TYPE")},
type = ?????,
generator=?????
)
private Set<ObjConstrain> constraints;
Class ObjConstrain has composite key:
- OBJECT_ID and CONSTRAIN_TYPE, which actually is of specific EnhancedUserType
What to write into CollectionId annotation?[/code]