Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] most optimal wy to persisted list?

JPA 2.0 and EclipseLink 2.0 will support ordered lists using an index column
in the database.  BasicCollections will also be standardized as
ElementCollection mappings in JPA 2.0.  The EclipseLink 2.0 builds already
have this functionality, and some of the functionality was in the 1.1
release.

The drawback with serializing is that you cannot query on the list values. 
However, if you don't need to query the values, then there is probably
nothing wrong with serializing the list.

You can also map the list as a OneToMany in JPA 1.0, and define a class for
the value that also contains an index field to order the list by.


Phillip Ross-3 wrote:
> 
> 
> Hi all...
> 
> I'm just wondering, for EclipseLink, what is the most optimal way to
> persist List fields of an entity.  The @BasicCollection does not include
> persisting the index of the List elements (as far as I can tell) so when
> the EntityManager is cleared or a new one which does not alreayd know
> about the in-memory version of the List is used... the index values are
> lost.  In the current implementation, there are lists being serialized to
> byte arrays and stored as LOB columns which is not... optimal :)
> 
> Any advice on this?  Portability to other JPA providers is of little
> concern, if any.
> 
> Thanks!
> - Phillip
> 
> _______________________________________________
> eclipselink-users mailing list
> eclipselink-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/eclipselink-users
> 
> 


-----
---
http://wiki.eclipse.org/User:James.sutherland.oracle.com James Sutherland 
http://www.eclipse.org/eclipselink/
 EclipseLink ,  http://www.oracle.com/technology/products/ias/toplink/
TopLink 
Wiki:  http://wiki.eclipse.org/EclipseLink EclipseLink , 
http://wiki.oracle.com/page/TopLink TopLink 
Forums:  http://forums.oracle.com/forums/forum.jspa?forumID=48 TopLink , 
http://www.nabble.com/EclipseLink-f26430.html EclipseLink 
Book:  http://en.wikibooks.org/wiki/Java_Persistence Java Persistence 
-- 
View this message in context: http://www.nabble.com/most-optimal-wy-to-persisted-list--tp22229802p22289630.html
Sent from the EclipseLink - Users mailing list archive at Nabble.com.



Back to the top