openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xzer <>
Subject Re: how to deal with jdbc4 sql array?
Date Fri, 16 Nov 2012 02:43:37 GMT
Well, it works for query and update now.


declare the field as @Lob and set col type in the handler as above
will work well.

but there is still a problem, I can not use the field as a query condition:

Caused by: java.lang.IllegalArgumentException: Parameter
"Parameter<long>(2)" declared in "select c from WatchCondition c where
c._targetType = ?1 and c._testIdList = ?2" is set to value of
"[J@3dc016fe" of type "[J", but this parameter is bound to a field of
type "long".
	at org.apache.openjpa.persistence.AbstractQuery.assertValueAssignable(
	at org.apache.openjpa.persistence.AbstractQuery.bindValue(
	at org.apache.openjpa.persistence.AbstractQuery.setParameter(
	at org.apache.openjpa.persistence.AbstractQuery.setParameter(

2012/11/16 xzer <>:
> @PersistentCollection does not work for me, it always gives a message
> as "the_field_as_array isn't supported by declared persistence
> strategy "Basic".  Please choose a different strategy."
> I follow the description in the jira ticket to declare the field as
> @Lob, it works for query, but still not work for update.
> In the jira ticket, it says I should provide an extended
> PostgresDictionary, how to tell openjpa to use my extended
> PostgresDictionary?
> 2012/11/15 Krzysztof <>:
>> Use your own strategy:
>> @PersistentCollection
>> @Strategy("")
>> private double[] timeDecay;
>> Example for float8[] below, change toDataStoreValue to deal with
>> Long/bigint.
>> <>
>> Cheers
>> --
>> View this message in context:
>> Sent from the OpenJPA Users mailing list archive at

View raw message