• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Enforcing Forign Key constraints via Hibernate

 
Ally Cavs
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys,

My main aim is to persist the web service objects. So changing the web service classes is not allowed. My hibernate mapping are configured to generate the DB.
So what I have is



My hbm file is


So since I cant have my purchase order varibale as object in invoice and declare my one-to-one relationship, can i add something else that will enforce a foreign key behind property name="purchaseOrderID".
I cant change this property to a purchase order object and this is not open to negotiation. Any pointers here would be much appreciated. I bet its simple but i cant figure it out

Thanks
Alan
 
Ally Cavs
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Any ideas?
 
Ally Cavs
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Guy i really need a hand here. Quite simply if i have



Can i designate this as a foreign key constraint against another column on anotehr table
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic