[Objectbridge-developers] Order of commit in ODMG transaction
Brought to you by:
thma
From: Charles A. <cha...@hp...> - 2001-09-25 09:49:35
|
Hello, I have objects AccountingTransaction and AccountingEntry. There is a one to many relationship between the Transaction and Entry. This is backed up by a foreign-key constraint in the database. I want to be able to commit the Transactions and Entries within the same (ODMG) transaction (so that either all or none are created in the database). Unfortunately, it seems that sometimes the AccountEntry gets created before the AccountTransaction within the database transaction of the commit, thus violating the foreign key constraint. After a quick look at the sourcecode, it seems that the ObjectStateTable stores the ObjectTransactionWrapper's in a hashtable, and that on Commit, the ObjectTransactionWrapper's are processed in hashtable order. Whilst I'm not sure this classifies as a bug, it would be an immense benefit to have the objects committed in order; it shouldn't be too difficult to store the objects order in a Vector (or similar) on the ObjectStateTable, and process the Vector on commit. I am sure I'm missing something pretty obvious here; I'm not sure what it is though. Is there any chance of a solution to this problem ? With many thanks, Charles. This email and any attachments are strictly confidential and are intended solely for the addressee. If you are not the intended recipient you must not disclose, forward, copy or take any action in reliance on this message or its attachments. If you have received this email in error please notify the sender as soon as possible and delete it from your computer systems. Any views or opinions presented are solely those of the author and do not necessarily reflect those of HPD Software Limited or its affiliates. At present the integrity of email across the internet cannot be guaranteed and messages sent via this medium are potentially at risk. All liability is excluded to the extent permitted by law for any claims arising as a re- sult of the use of this medium to transmit information by or to HPD Software Limited or its affiliates. |