In JDBC4 there are functions to create and set SQL arrays so this should not
be that complicated.
In Hibernate it's quite straightforward, have a look at:

https://www.hibernate.org/393.html

Could you please point me to a valid example for OpenJpa? This looks like a
perfect point for using advertised OpenJpa extensibility, does not it?

Best regards,
Krzysztof


Krzysztof wrote:
> 
> Hello,
> I am inclined to add full support of mapping primitive arrays onto native
> DB arrays (Postgres first, then maybe for Oracle). 
> 
> We would like to run SQL aggregations on a lot of double[] arrays and
> mapping onto @Lob or @ElementCollection does not really work here.
> 
> It is a general question how to support new DB types. I know I will have
> to implement either ValueHandler or a Strategy but I am unable to locate
> any example how actually do this for normally non-supported native DB
> type...
> 
> Since primitive arrays are mapped to blobs, I'd think BlobValueHandler
> could be an example, could you confirm this? SQL_ARRAY appears in a few
> places in the code (i.e. DBDictionary), so it seems there is some
> infrastructure to support SQL arrays but how to use it?
> 
> Should
> org/apache/openjpa/persistence/jdbc/AnnotationPersistenceMappingParser.java
> be extended too if I'd like to add schema synchronisation?
> 
> 
> Some generic example in the documentation would be a real helper.
> 
> Best regards,
> Krzysztof
> 
> 
> 

-- 
View this message in context: 
http://n2.nabble.com/SQL-ARRAY-support-primitive-arrays-native-mapping-tp4182645p4197345.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.

Reply via email to