Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

UniqueConstraint

 
Treimin Clark
Ranch Hand
Posts: 757
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HeadFirst EJB 3.0 Book wrote:The @Table.UniqueConstraint attribute allows you to specify unique column constraint.


JPA Specs- (9.1.4) wrote:The UniqueConstraint annotation is used to specify that a unique constraint is to be included in the generated DDL for a primary or secondary table.


But I didn't understand what is this "unique column constraint"


 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It allows to generate unique constraints in the DDL. Unique constraints are explained here. (I don't think this kind of annotation is at the exam, but who knows...)
 
Treimin Clark
Ranch Hand
Posts: 757
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Christophe Verré wrote:It allows to generate unique constraints in the DDL. Unique constraints are explained here. (I don't think this kind of annotation is at the exam, but who knows...)


Thanks Christophe
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic