heerser wrote:
Hi all,
I have a couple of questions regarding ConcurrencyExceptions:
What if the IPredicateExpression put in the save method is based on more than one field :
PredicateExpression.Add(PredicateFactory.CompareValue(OrderFieldIndex.AdminId,
ComparisonOperator.Equal, order.Fields[(int)OrderFieldIndex.AdminId].DbValue));
PredicateExpression.Add(PredicateFactory.CompareValue(OrderFieldIndex.StatusId,
ComparisonOperator.Equal, order.Fields[(int)OrderFieldIndex.StatusId].DbValue));
Order.Save( PredicateExpression );
Is there a way to determine which field(s) caused the exception?
No. The whole purpose is that you specify a filter which should be TRUE before the action (update, delete) can take place. If you specify a filter on 2 or more fields, and one of the fields makes the filter become FALSE, it then causes teh action not to take place, but which field made the filter become false is unknown, as the filter is appended to the actual query.
Is there anyway to get the current DB values of the field(s) that caused the ConcurrencyException??
Only with an additional fetch.