I seem to have run into a bug. I have a table with a BIGINT column. I'm trying to store a Long object into it (the value of which is retrieved earlier from System.currentTimeMillis()). When I try and store the value, I get a "Numeric value out of range" exception. I've pasted the relevant portion of the stack trace below, but it appears that it's trying to convert the long value to an int, which is causing the out of range error. I've tried using both setObject and setLong, but it happens in both cases.
My temporary workaround is to store the timestamp in seconds rather than milliseconds, but I'd prefer to just store the original value. MERGE INTO playlist VALUES (?, ?, ?, ?, ?, ?) -- (?1, ?2, ?3, ?4, ?5, ?6) [22003-166] at org.h2.message.DbException.getJdbcSQLException(DbException.java:329) at org.h2.message.DbException.get(DbException.java:169) at org.h2.message.DbException.get(DbException.java:146) at org.h2.value.Value.convertToInt(Value.java:945) at org.h2.value.Value.convertTo(Value.java:581) at org.h2.table.Column.convert(Column.java:143) at org.h2.command.dml.Merge.update(Merge.java:97) at org.h2.command.CommandContainer.update(CommandContainer.java:73) at org.h2.command.Command.executeUpdate(Command.java:226) at org.h2.jdbc.JdbcPreparedStatement.executeUpdateInternal(JdbcPreparedStatement.java:143) at org.h2.jdbc.JdbcPreparedStatement.executeUpdate(JdbcPreparedStatement.java:129) at com.jolbox.bonecp.PreparedStatementHandle.executeUpdate(PreparedStatementHandle.java:203) at in.benjamm.pms.DataModel.Model.Playlist._updateDatabase(Playlist.java:252) -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To view this discussion on the web visit https://groups.google.com/d/msg/h2-database/-/1SX2NgLw9XsJ. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/h2-database?hl=en.
