• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

JPA One to Many Uni - Many side without PK

Ranch Hand
Posts: 413
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Guys,

I have 2 tables as follows.

id (pk)

emp_id (fk to employee)

Note that
Employee can have multiple addresses.
address does not have id (pk) field so as per my understanding address can not be marked as entity.

What is the right annotation for Address,
What is the right annotation for Set<Address> addresses field in Employee classes.

Thanks in advanced.
Chaminda Amarasinghe
Ranch Hand
Posts: 413
Consider Paul's rocket mass heater.
    Bookmark Topic Watch Topic
  • New Topic