-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Labels
Description
When we are using sql server dialect and use the save or update method there will be this exception. In #18 you suggest to use Column#setIgnoreOnUpdate(true). But we need to set this on every table we use. Better when LSql sets automatically on primary key columns ignoreOnUpdate=true
Caused by: java.sql.SQLException: Cannot update identity column 'id'.
at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:372) ~[jtds-1.3.0.jar:1.3.0]
at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2893) ~[jtds-1.3.0.jar:1.3.0]
at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2335) ~[jtds-1.3.0.jar:1.3.0]
at net.sourceforge.jtds.jdbc.TdsCore.getMoreResults(TdsCore.java:638) ~[jtds-1.3.0.jar:1.3.0]
at net.sourceforge.jtds.jdbc.JtdsStatement.processResults(JtdsStatement.java:613) ~[jtds-1.3.0.jar:1.3.0]
at net.sourceforge.jtds.jdbc.JtdsStatement.executeSQL(JtdsStatement.java:572) ~[jtds-1.3.0.jar:1.3.0]
at net.sourceforge.jtds.jdbc.JtdsPreparedStatement.executeUpdate(JtdsPreparedStatement.java:727) ~[jtds-1.3.0.jar:1.3.0]
at com.zaxxer.hikari.pool.ProxyPreparedStatement.executeUpdate(ProxyPreparedStatement.java:61) ~[HikariCP-2.5.1.jar:na]
at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.executeUpdate(HikariProxyPreparedStatement.java) ~[HikariCP-2.5.1.jar:na]
at com.w11k.lsql.Table.executeUpdate(Table.java:487) ~[lsql-core-0.23.0.jar:na]
at com.w11k.lsql.Table.updateWhere(Table.java:229) ~[lsql-core-0.23.0.jar:na]
... 44 common frames omitted
Reactions are currently unavailable