cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Stobbe <>
Subject SQL UPDATE fires on non-primitive values
Date Tue, 17 Jun 2014 21:03:12 GMT

I have a decimal column which is translated to a BigDecimal. When the value
is equal to 0 and I set the value equal to 0 again, it will actually
perform a SQL UPDATE. The two objects are "==", but they are "equals".
In the source I found in de PersistentObjectHolder.setValue the following:

Object oldValue = setValueDirectly(value);
if (oldValue != value && relationshipOwner.getObjectContext() != null) {
relationshipName, oldValue, value);

Is this piece of code used for non-primitive properties?


PS: I am using 3.2M1

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message