Forums Register Login

OpenJPA Foreign Key

+Pie Number of slices to send: Send
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.
Fire me boy! Cool, soothing, shameless self promotion:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 1531 times.
Similar Threads
Identity issue for EJB3.0 Entity along with Hibernate HBM configuration
how to use a composite primary key as foreign key
How to Set Primary / Foreign Keys or Relationships with Hibernate 3 / JPA Tables?
inheritance and schema creation using JPA annotations
JPA-Hibernate One-to-One Bidirectional Relationship issue
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 18:09:18.