[Opensource] Expresso DBObjects - Serious error in
caching or something else?
Michael Rimov
rimovm at centercomp.com
Wed Aug 27 05:19:29 PDT 2003
At 04:59 PM 8/14/2003 +0200, you wrote:
>Hi Mike,
>
>I tried the things with the 5.3rc1 version and the error is still there. I
>tried with both with the default Hypersonic and PostgreSQL DBs. So it
>seems that your unit tests are not the same. :)
>
>Unfortunately I will be unavailable in the next few weeks so to help you
>track down the problem I attach an example DBObject I use for testing, and
>include my null unit test into this mail. Please try to test the things
>with exactly this configuration. If it works for you I have no idea why
>doesn't it work for me. :(
Gabor,
Thank you for the unit test. I "re-outfitted" it for the expresso dbobject
test case and found that:
Issue 1: You were picking up default values, thus some things weren't
getting nullified (fixed in CVS)... a quick workaround to this issue for
the first retrieve() would be to call clear(), then set the fields(), but
you'll have to set cache size to zero for the dbobjects that are needed
this way due to issue #2:
Issue 2: You are correct in that retrieveFromCache() was the culprit for
not allowing null values on the second time. The real issue was that it
was calling getField() which never returns a null value [as per
javadocs]. Calling getDataField(fieldName).asString() DOES provide the
correct behavior.
Thanks for pointing it out! RC-2 should now have this correct. [Will be
posted in a few days]
-Mike
More information about the Opensource
mailing list