Bruce et alias, after some investigation on my side, I come to believe that whether the cache is used or not does not make a difference in this case. Why ? If somebody calls Database.create() as part of as transaction, a cache entry will not be added until execution of the commit phase. In my tests, I tried to turn the performance caches on and off, and it simply didn't make a difference.
As already mentioned in a separate reply, I came to believe that this might have been fixed with the 0.9.6 release candidate, but I cannot pin down the bug number right now. All tests I have been running complete successfully, irrespective of whether the id is part of the OQL query or not. Werner On Wed, 10 Nov 2004 14:19:05 -0700, Bruce Snyder wrote: > >SYLVIE PALLUEL wrote: > >> I don't know if this can help you, but I made another test with an OQL >> pass-thru, and I get the new object before the commit phase. > >It seems to me that using pass through SQL should only work if you are >using autocommit. Are you using autocommit? What database are you using? > >> Is there something special to do to enable the OQL query to see the objects >> created inside the current transaction? > >There's nothing special that needs to be done. Just as Patrick stated, >OQL queries do not look at the cache before going to persistence. This >is different from the db.load() method which actually does look at the >cache first. > >Bruce >-- >perl -e 'print >unpack("u30","<0G)[EMAIL PROTECTED]&5R\"F9E<G)E=\$\!F<FEI+F-O;0\`\`");' > >The Castor Project >http://www.castor.org/ > >Apache Geronimo >http://geronimo.apache.org/ > > > >----------------------------------------------------------- >If you wish to unsubscribe from this mailing, send mail to >[EMAIL PROTECTED] with a subject of: > unsubscribe castor-dev > ----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to [EMAIL PROTECTED] with a subject of: unsubscribe castor-dev