I have been trying to use Hibernate and H2s capability of using
java.util.UUID.  The problem is that no matter what I have the UUID
field of my object set to, the UUID ends up in the db as:

aced0005-7372-000e-6a61-76612e757469


Is this value hard coded somewhere?  I get exceptions like this even
when I print out the UUID to the console on the Java Side and it is
different then the previous:

org.h2.jdbc.JdbcSQLException: Unique index or primary key violation:
PRIMARY_KEY_7  ON PUBLIC.MYOBJECT(UUID) [23001-106]
        at org.h2.message.Message.getSQLException(Message.java:103)
        at org.h2.message.Message.getSQLException(Message.java:114)
        at org.h2.message.Message.getSQLException(Message.java:77)
        at org.h2.index.BaseIndex.getDuplicateKeyException(BaseIndex.java:
160)
        at org.h2.index.BtreeLeaf.add(BtreeLeaf.java:67)
        at org.h2.index.BtreeIndex.add(BtreeIndex.java:223)
        at org.h2.table.TableData.addRow(TableData.java:117)
        at org.h2.command.dml.Insert.update(Insert.java:96)
        at org.h2.command.CommandContainer.update(CommandContainer.java:71)
        at org.h2.command.Command.executeUpdate(Command.java:207)
        at org.h2.server.TcpServerThread.process(TcpServerThread.java:297)
        at org.h2.server.TcpServerThread.run(TcpServerThread.java:136)
        at java.lang.Thread.run(Unknown Source)

--

You received this message because you are subscribed to the Google Groups "H2 
Database" group.
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=.


Reply via email to