• Post Reply Bookmark Topic Watch Topic
  • New Topic

OpenJPA Foreign Key

 
Popescu Ion
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I have two entity classes : Customers and Users with primary keys customer_id and user_id. I need to set up a foreign key in Users named customer_id. What is the syntax of declaring a foreign key? And how to set up a relation One-to-Many between this tables?




Please.
I'll appreciate any help. Thnx in advance.
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!