You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have an issue with Spring Data JDBC when trying to insert an entity which contains the Java type double[]. The corresponding table contains a PostgreSQL type double precision[]. When inserting such an entity, I get this error:
Caused by: org.postgresql.util.PSQLException: Unable to find server array type for provided name DOUBLE.
Postgres requires the non standard type "FLOAT8" for "DOUBLE".
This is accomplished by making the conversion dependent on the dialect.
This required a new JdbcDialect interface in order to keep the JDBC annotation out of the relational module.
Closes#1033
Postgres requires the non standard type "FLOAT8" for "DOUBLE".
This is accomplished by making the conversion dependent on the dialect.
This required a new JdbcDialect interface in order to keep the JDBC annotation out of the relational module.
Closes#1033
Postgres requires the non standard type "FLOAT8" for "DOUBLE".
This is accomplished by making the conversion dependent on the dialect.
This required a new JdbcDialect interface in order to keep the JDBC annotation out of the relational module.
Closes#1033
Hi all
I have an issue with Spring Data JDBC when trying to insert an entity which contains the Java type
double[]
. The corresponding table contains a PostgreSQL typedouble precision[]
. When inserting such an entity, I get this error:I created a repo containing a MWE and the full stack trace: https://github.com/LEDfan/spring-data-jdbc-double-array .
Note that this works:
I also tried using
List<Double>
(when advised on Gitter), but this causes the same error.It seems that
org.springframework.data.jdbc.support.JdbcUtil
is used in the Spring code to convert the Double class to the text DOUBLE, however such a type is not supported by postgresql. The types supported are listed here: https://github.com/MSGoodman/pgjdbc/blob/master/pgjdbc/src/main/java/org/postgresql/jdbc/TypeInfoCache.java#L72Let me know if you need more information and thanks in advance!
The text was updated successfully, but these errors were encountered: