[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[eclipselink-users] NaN prevents updates
|
I am using eclipselink 1.1.0.r3634 and have an eclipselink entity that has a
float value that is being mapped to a binary_float in the database. If
another source writes a NaN to that field in the database the entity is
properly updated and I can read it out. If I then turn around and update a
different value it almost works, but not quite. The generated SQL looks
something like "height = NAN" when it needs to look like "height = 'NAN'" or
use a bind parameter. I am guessing that this is because it is a numeric
value that doesn't usually need quotes. I am working on inherited code so I
am not super familiar with the setup, but I have not been able to find
anything that would be disabiling binding. That said it doesn't look like it
is. I tried manually setting the JDBC_BIND_PARAMETERS property to 'true' but
it didn't seem to make any difference. When I actually make the update I use
an EntityManager and the following methods:
EntityManager manager = getEntityManager();
manager.getTransaction().begin();
manager.merge(<entity object>);
manager.getTransaction().commit();
There is something about a session override class that is set in the
EntityManager properties that was implemented to prevent double commits from
being sent when the commit() method was called.
This wouldn't likely have anything to do with the caching properties, would
it? We tried to turn most of the caching on the EntityManager off because we
implement our own caching mechanisms.
--
View this message in context: http://old.nabble.com/NaN-prevents-updates-tp28835079p28835079.html
Sent from the EclipseLink - Users mailing list archive at Nabble.com.