kaleidos / grails-postgresql-extensions

Grails plugin to use postgresql native elements such as arrays, hstores,...
Apache License 2.0
78 stars 62 forks source link

Mapping of Float arrays #63

Open mochalov opened 9 years ago

mochalov commented 9 years ago

When performing domain saving and retrieving in different sessions (in order to avoid Hibernate use session's cache) java.lang.ClassCastException: Cannot cast [Ljava.lang.Double; to [Ljava.lang.Float exception is thrown for domains having property of type Float[]. That happens because PostgreSQL stores such property in column of type float8[] and JDBC maps it to Double instead of Float. Maybe remove Floats support at all? Please check also http://docs.oracle.com/javase/1.5.0/docs/guide/jdbc/getstart/mapping.html#1055162

ilopmar commented 9 years ago

In this case I think we can map both Float and Double to float8[] and add a note in the documentation.

@Alotor what do you think?