permaculture playing cards*
The moose likes Object Relational Mapping and the fly likes Hibernate: many-to-many --how to add a constrain? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Hibernate: many-to-many --how to add a constrain? " Watch "Hibernate: many-to-many --how to add a constrain? " New topic
Author

Hibernate: many-to-many --how to add a constrain?

Adrian Burlington
Ranch Hand

Joined: Jun 16, 2009
Posts: 75
Hi all,
I'm trying to have a unique-constrain on a many-to-many relationship.


in the table: KFP_RELATIONSHIP I don't wish to have a duplication of KFP_ID and CUSTOMER_ID.
Can anyone point how to fix it?

Thanks!
 
Don't get me started about those stupid light bulbs.
 
subject: Hibernate: many-to-many --how to add a constrain?
 
Similar Threads
OpenJPA Foreign Key
OneToMany <-> ManyToOne relationship
Hibernate bidirectional manyToOne: How to get Index easily.
Reading All the records from a table + Hibernate
JPA-Hibernate One-to-One Bidirectional Relationship issue