|When Oracle converts empty string to null, does EclipseLink cache reflect that? [message #386576]
||Thu, 02 April 2009 07:31
| Torben Putkonen
Registered: July 2009
Some databases - like Oracle - store empty strings as null, whereas some |
databases differentiate between null and empty string. This is causing us
First we persist using TopLink Essentials an entity, which has an empty
string as one field. Oracle converts this value to null when it stores it.
However, when I fetch the entity, TopLink returns it from the cache, where
this field is still an empty string. EclipseLink doesn't seem to know,
that what got stored into the database was actually a null value, and this
incoherency is causing problems - testing if a field is null value fails
because an empty string is returned from the cache.
Naturally it is not difficult to handle these cases in the application
level, but it would be nice if we didn't need to take into account
behaviour of different RDBMS.
We are considering upgrading from TopLink to EclipseLink. Is EclipseLink
capable of updating its cache according to what actually got stored to the
database, or is there any other way to tackle this issue?
Powered by FUDForum
. Page generated in 0.01839 seconds