Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Element collections

 
Jayr Motta
Ranch Hand
Posts: 110
Google App Engine Google Web Toolkit Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I'm studying for the JPA certification and I've read about element collections in the book I'm reading(Pro JPA 2, Mastering the Java persistence), but I could not see the benefits of that, neither how it's better than a "common" relationship.

Does someone know what benefits it brings or a possible source of information about it? (I'm gonna read the specification soon, maybe this helps ..)
 
Manuel Petermann
Ranch Hand
Posts: 177
Hibernate Linux Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I use element collections when I simply need a primitive datatype in a collection. You may declare a new relationship but then you need a new class just for one field. Its too bloated imo.
 
Michael Babula
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello everyone.. New here
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic