• Post Reply Bookmark Topic Watch Topic
  • New Topic

DB constraints and composite primary keys  RSS feed

 
David DeCesare
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have two questions about JDO:
1) I have constaints created in my tables to restrict the values that go into the fields. For example, I made a "boolean" value in MySQL to be a tiny int that can only have the values 0 or 1. Does the JDO spec take that into consideration when an existing database is being reversed engineered? Along the same lines, if I have an index that forces uniqueness to the values in a field, does the JDO use that information?
2) How well are composite primary keys handled in JDO. I have a number of tables (especially intersection tables) whose primary keys are a combination of several foreign keys.
Thank you,
David
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The JDO specification leaves mapping issues to the implementations. That would imply that you should be asking whether some-specific-product takes composed primary keys into consideration (instead of "whether the JDO specification...").
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!