This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JPA Certification (OCEJPA) and the fly likes Element collections Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » JPA Certification (OCEJPA)
Bookmark "Element collections" Watch "Element collections" New topic

Element collections

Jayr Motta
Ranch Hand

Joined: Jul 30, 2010
Posts: 110


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 ..)

Feel free to ask me anything!!/ref=jmotta, SCJP 6, OCWCD JEE5, OCE EJB JEE6
Manuel Petermann
Ranch Hand

Joined: Jul 19, 2011
Posts: 175

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.

Please correct my English.
Michael Babula

Joined: Oct 10, 2011
Posts: 1
Hello everyone.. New here

I agree. Here's the link:
subject: Element collections
Similar Threads
Usefulness of assigning an object to an interface reference variable?
Element collections and Map relationships
JPA certification experiences
join tables from different schema in jpa
SCBCD -5.0 material