>What is the best practice for using transactions in Mere Mortals? I read the information on transactions in the developer guide, and I tried implementing it before with some issues. I don't recall exactly the problem, but I know that I was having problems with it saving the children before when I tried using it. I had two tables (a parent and a child). I had the parent basically instantiating the child like in the doc. I had AutoSaveOnParentSaved set, and I remember an error being thrown this way.
>
>I am at the stage of having to use this scenario again, and I would like to wrap these into a transaction. Basically I am reading in information from a file that contains check payment information. The header contains the total amount of each line item. The line items detail how the check was split. I am reading this information into two tables. I want it to be a transaction, so if it fails everything will rollback. I would like suggestions as to how I should implement this using business objects from a best practice standpoint.
I don't know if there is a best practice. You can do as you suggest in your post to make sure you register a child to a parent and set AutoSaveOnParentSaved property and let the framework take care of it. If you find you still have an error, post it and we can try to figure it out. Also, you can wrap your own transactions manually if you prefer.
Tim
Timothy Bryan