Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

CONSTRAINT clause help

 
Mr. C Lamont Gilbert
Ranch Hand
Posts: 1170
Eclipse IDE Hibernate Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to create a table that has a couple of unique fields like so

Where containableGraphics is another table with the fields ID and ParentID. I am trying to say that Position(s) are UNIQUE with respect to each Parent. But I don't think this type of constraint will work. I can always do this;


But I didnt want to redundantly enter the ContainerID when this info is also referred to by the containableGraphics ID since a containableGraphics can have only 1 parent which is a containerGraphics.
Any ideas on this??
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic