Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] NaN prevents updates

Parameter binding is on by default in EclipseLink, so it is odd you are not
getting binding.  Check that you have not turned binding off somewhere in
your application.

Could you include the SQL with the NaN.  Also is any other SQL using
binding, or is it all inlinned parameters?

NaN should also work for inlinned parameters, so please log a bug for this,
and ensure you include your database platform that you are using.



stryon wrote:
> 
> 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. 
> 
> 


-----
http://wiki.eclipse.org/User:James.sutherland.oracle.com James Sutherland 
http://www.eclipse.org/eclipselink/
 EclipseLink ,  http://www.oracle.com/technology/products/ias/toplink/
TopLink 
Wiki:  http://wiki.eclipse.org/EclipseLink EclipseLink , 
http://wiki.oracle.com/page/TopLink TopLink 
Forums:  http://forums.oracle.com/forums/forum.jspa?forumID=48 TopLink , 
http://www.nabble.com/EclipseLink-f26430.html EclipseLink 
Book:  http://en.wikibooks.org/wiki/Java_Persistence Java Persistence 
-- 
View this message in context: http://old.nabble.com/NaN-prevents-updates-tp28835079p28891622.html
Sent from the EclipseLink - Users mailing list archive at Nabble.com.



Back to the top