Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] How do map a Number[] Array to a VARRAY in EclipseLink

EclipseLink supports most structured object-relational data-types including
VARRAY.  There is no annotation support yet, but you can define the mapping
using a DescriptorCustomizer.  For a collection of numbers into a VARRAY,
you would use the ArrayMapping
(org.eclipse.persistence.mappings.structures).

In general JPA does supports Collection, Set and List, not arrays, so
perhaps use a List in your object model, (otherwise transform array to List
in property get/set methods).  Generally Java Collections are much more
useful than arrays.


Zummy wrote:
> 
> How do I map a Number[] array to a VARRAY (an array stored in a column) in
> EclipseLink?  Is there an annotation for this yet?  Right now I am using
> JDBC, I would like to move to annontations with JPA in an Entity.
> 
> Thanks, John
> 


-----
---
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/How-do-map-a-Number---Array-to-a-VARRAY-in-EclipseLink-tp17090105p17104458.html
Sent from the EclipseLink - Users mailing list archive at Nabble.com.



Back to the top