openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Heather Sterling <>
Subject support for persisting primitive arrays
Date Fri, 10 Apr 2009 20:45:46 GMT

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
 isn't supported by declared persistence strategy "Basic".  Please choose a
different strategy.

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?


Heather Sterling
Systems Management Development
Phone:  919-254-7163 T/L: 444-7163
Cell: 919-423-3143
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message