openjpa-users mailing list archives

I am trying to understand whether OpenJPA supports primitive arrays or not.
I am able to persist arrays just fine if they are primitive wrapper classes
( e.g. Double[]). However, I get the following exception for primitive
arrays (e.g. double[]):
<openjpa-1.2.0-r422266:683325 fatal user error>
org.apache.openjpa.util.MetaDataException: The type of field
"com.ibm.sysmgmt.resource.caching.jpa.test.entities.PropertyTestElement.mDoubleArray"
isn't supported by declared persistence strategy "Basic". Please choose a
different strategy.
at
org.apache.openjpa.persistence.AnnotationPersistenceMetaDataParser.parseBasic
(
AnnotationPersistenceMetaDataParser.java:1264)
The OpenJPA manual claims the following::
OpenJPA also supports arrays, java.lang.Number, java.util.Locale, all JDK
1.2 Set, List, and Map
types, and many other mutable and immutable field types. OpenJPA also
allows you to plug in support for custom types.
1) Are primitive arrays supported? If so, what strategy should be used
besides Basic?
2) Should I use the wrapper classes when persisting arrays?
Thanks
Heather Sterling
Systems Management Development
Phone: 919-254-7163 T/L: 444-7163
Cell: 919-423-3143
Email: hsterl@us.ibm.com