Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipselink-users] Postgres arrays

Hi,
I'm trying to get a mapping for postgres arrays working. I'm using a Converter and thus far (without a lot of testing), inserting an array seems to work fine. But, when reading that array, eclipselink (1.2) throws the following exception before we even get to the Converter:
java.lang.ClassCastException: [D cannot be cast to [Ljava.lang.Object;
at org.eclipse.persistence.mappings.structures.ObjectRelationalDataTypeDescriptor.buildArrayObjectFromArray(ObjectRelationalDataTypeDescriptor.java:326)
...

The problem seems to be that eclipselink is attempting to cast java.sql.Array.getArray() to Object[], but postgres returns an array of primitives. This seems like an eclipselink bug, no? Any idea for a workaround?

Thanks,
Mike



Back to the top