Transactions

Transactions

Old forum URL: forums.lhotka.net/forums/t/6807.aspx


ms9999 posted on Friday, April 17, 2009

I am trying to save two objects within a transaction. I am generating the objects with CSLAGen and selecting the EnterpriseServices TransactionType. This adds a Transactional attribute to the dataportal methods. My question is why are the two saves not working as a transactions.

ajj3085 replied on Friday, April 17, 2009

It sounds like you're trying to save two root objects. By definition, they always complete within their own transaction. You'll need to create a third BO, possibly a CommandBase subclass, which will have the attribute and call Save on each BO in its DataPortal_Execute method. Search around on the forum, this has come up before.

RockfordLhotka replied on Friday, April 17, 2009

http://www.lhotka.net/cslanet/faq/SaveMultipleRootObjects.ashx

Copyright (c) Marimer LLC