[jboss-user] [EJB 3.0] - Re: How to define unique constraint on foreign keys ?

fhh do-not-reply at jboss.com
Sat Oct 13 10:26:16 EDT 2007


According to spec you can use 


  | @javax.persistence.JoinColumn(name = "EMPLOYE_FK",unique=true)
  | 


However, if you are creating the schema from scratch I suggest you use a @OneToOne relationship which does exactly what you want.

Regards

Felix

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4094876#4094876

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4094876



More information about the jboss-user mailing list