Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.1 [LEGACY], 1.2 branch
-
None
Description
Test suite submitted by Mikaƫl Cluseau:
http://www.objectstyle.org/cayenne/lists/cayenne-devel/2005/06/0036.html
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:
http://www.objectstyle.org/cayenne/lists/cayenne-devel/2005/03/0086.html