Emmanuel DUPONT wrote:
Hi Armin !
It looks like a bug. It is quit difficult for me to send to you a test case because my db model is quit complicated. It is because of one circular reference between one object A with different FK (one to itself) and another object B witch has an FK to A also.
OJB delete A before B.
Not very clear. I shall try to send to you a test case next week.
This would be a great help!
I don't understand the difference between flush and checkpoint....
checkpoint - write all objects to DB, commit the current tx, reopen it (do commit on underlying PB instance) and retain locks
flush - write all objects to DB without committing and retains all object locks
regards, Armin
-----Message d'origine-----
De : Armin Waibel [mailto:[EMAIL PROTECTED] Envoy� : vendredi 16 janvier 2004 13:12
� : OJB Users List
Objet : Re: Pb with the delete order
Hi Emmanuel,
Emmanuel DUPONT wrote:
All,
I have a recursive statement witch delete in a tree all nodes with
children
and dependencies.
The trouble is that I lock the entire objects in the right order (I
debugged
carefully) but OJB doesn't send the Sql delete statements in the good
order.
The odmg-api collect all modified/new objects and write to database when tx.commit was called. Within odmg all objects are prepared/re-ordered to avoid conflicts with database (done in ...odmg.ObjectEnvelopeTable at commit time).
If you think it's a bug in OJB, can you send me a test case for the problem?
I can resolve the trouble by placing some temporary checkpoint.
You can call the proprietary TransactionExt#flush() method to force odmg-api to write objects to DB without committing the tx.
Is it possible to ask to OJB to re-order the SQL statement..?
hmm, on odmg-level it's done by a not pluggable class. Thus there is no easy way to do this.
regards, Armin
Any other solution would be appreciated.
Thanks !
I'm working with OJB RC5, ODMG + PB.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
