Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Can we use non-primary column name in <key> element

 
MaheshS Kumbhar
Ranch Hand
Posts: 188
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


My question here is, can the column name "nonPrimary" be non-primary column in class "def"?

 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes and no. It will work, but if you are defining and association in you object model that is not in your relational model you are asking for trouble (it could very well be null or have duplicates). Why do you need to do this?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic