Test suite submitted by Mikaël Cluseau:
fails when an object is created, committed and then updated and committed. SQL UPDATE updates an ID value for no good reason. My investigation shows that this is due to Integer vs. Long PK... BIGINT PK columns default mapping is Long per JDBC standard. So on fetch it is converted to Long. PK generator on the other hand has a hardcoded behavior to create Integer ... So two values behave as if they are non-equal and generate a bogus update. We need to fix PK generator to use default JDBC to java mapping instead of assuming Integer.
Similar situation has been discussed before: