Information générale
Catégorie:
The Mere Mortals .NET Framework
Titre:
Parent/Child and Oracle Transactions
Hello,
I have been trying to do some transactional processing using the MM Parent/Child relationship. I set up a scenario where I save the parent entity and it automatically saves the child entity and that works OK. In a second scenario, I can manufacturer an error while saving the child entity, MM rolls back the transaction and the database remains unchanged. That is OK but then an exception is thrown:
System.InvalidOperationException was unhandled
Message: This OracleTransaction has completed; it is no longer usable.
I assume this indicates that MM is trying to do something with the transaction after it has completed.
If I set the Child's AutoUseTransactions property to false, the exception is not thrown, and the transaction appears to rollback successfully. This indicates the child is also trying to rollback after the parent.
Don't know if this is a bug or expected behaviour - couldn't find anything in the dev guide. Maybe you need to check the status of the transaction before rolling it back?
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement