Hi,

I've got a question about how to do updates on persistent objects
using JDO's ODMG Api.  I would look at the mailing list archive but it
does not seem to be working.  I've also looked at the apache jdo
website and there is a lot information there and I was wondering if
anyone had any links to other tutorials or examples.

I've looked at tutorial 2, especially UCEdit, which works fine and I
understand what it is doing.  That use-case, starts a transaction,
gets an object, gets a write lock, modifies the object, and then
commits the transaction.

The thing is that I would like to modify an object in a different
layer that is not db aware.  I would like to use a db manager layer to
do the reads and writes.  If I've gotten the object in one transaction
that was commited and then modified the object outside of a
transaction, what should the save method look like?

What I first tried to do was, start a transaction, get a write lock,
commit the transaction. But that did not work probably because the
lock did not detect a change in the object.  I then tried to, start a
transaction, query for the object, copy the values into the new
object, commit the transaction.  But that did not work either, I'm
guessing because my second query retrieved the object from the cache
and then the transaction did not detect an actual change in the object
since the lock was acquired after the object was really modified.

Is there a way to mark the object "dirty"?  Do I need to remove it
from the cache?  Is there a simpler solution?  What am I overlooking?
Also, is there a good reference for OQL?

Thanks in advance,

Julio



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to