• Post Reply Bookmark Topic Watch Topic
  • New Topic

element collection issue

Sanjay Jha
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All,

I have a question on @ElementCollection concept.

In pro jpa 2, if we are using ElementCollection, then the join table will have composite primary key that is if Elementcollection is basic type and assuming source entity has one primary key (for example pkid), then primary key in join table would be the 2 columns (pkid and basic var name in embedded class) and also same for embeddable element collection(pkid and all field of embeddables)

but when I am doing the same example using jpa-hibernate and MySQL server, the tables are showing pkid as primary key for both the cases, could anyone please clarify. thanks in advance.

I'm full of tinier men! And a tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!