Rhett wrote,
> You have to commit after you finish whatever amount of work needs to be done
>atomically
It doesn't matter, I still get the old objects.
The server is singlethreaded, has one instance to
castor Database which is opened at startup
this is what basically happens:
I have an Object A which has a vector of B's
1. one request
db.begin();
myOQL =db.getOQLQuery("SELECT ...");
myOQL.bind("123");
objectA= (ObjectA) results.next();
// print out the number of B's, let's say it comes out to 5
// add a new ObjectB to A's vector
// print out the number of B's, comes out to 6
db.commit();
2.
I look at the database rows and the new ObjectB has been inserted
3.
someone manually deletes all the B-rows in the database
4. another request
db.begin();
myOQL =db.getOQLQuery("SELECT ...");
myOQL.bind("123");
objectA= (ObjectA) results.next();
// print out the number of B's,
// it should be zero, but it's actually 6,
// the last object is cached
// add a new ObjectB to A
// print out the number of B's, should be 1, but comes out to 7
db.commit();
/Thomas
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev