Hello. Here's a schema with Company, Account and Order tables. A Company is 1:N with Account and Account is 1:N with Order. There is a UC on Account.Name. Using v1.0.2004.2 and self-servicing I was trying to create a new order for a new account:
AccountEntity ae = new AccountEntity();
ae.Company = _company;
ae.Name = "Smith";
OrderEntity oe = new OrderEntity();
oe.Account = ae;
ae.Save(true);
The problem is that if the UC is violated once, then it becomes impossible to create new accounts; that violation keeps happening indefinitely on every save. I figured the problem is in using the same _company entity instance so I fixed it by changing line 2 above with this:
ae.CompanyID = _companyID;
The global _company entity doesn't need to be updated, so it doesn't need to participate in the recursive save, but I would expect that when Save doesn't succeed for whatever reason, the operation should totally rollback and clean up all participating entities. Is that a wrong assumption?