1. how to name unique key contraints with annotations forum.hibernate.org |
2. Annotations - Part of primary key marked as unique forum.hibernate.orgUsing Hibernate 3.2 Annotations and DDL to generate table I do I stop one of the primary key from been flagged as unique. I have a scenario where my users might have more than one role. I have implemented this using JoinTable as shown below @OneToMany @JoinTable(name="UserRole", joinColumns = { @JoinColumn( name="user_id", unique = false) }, inverseJoinColumns = @JoinColumn( name="role_id", unique=false, ... |
3. unique-key and annotations forum.hibernate.org |