Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mapping of Float arrays #63

Open
mochalov opened this issue Apr 6, 2015 · 1 comment
Open

Mapping of Float arrays #63

mochalov opened this issue Apr 6, 2015 · 1 comment

Comments

@mochalov
Copy link

mochalov commented Apr 6, 2015

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
Copy link
Collaborator

ilopmar commented Apr 6, 2015

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants