Under various circumstances, the same actions will result in a Node Out of Date Exception
. Here are two separate instances that caused this exception:
- When I update a field on a specific Content item (Order), other
Content is created (Invoice) when
Order.Save()
is called. When I do the update one item at a time everything works fine. However, when I iterate through the list I get aNodeIsOutOfDateException
. Putting a delay in the loop --Sleep(1000)
-- makes no difference. - I create new
Content
and then create child items below it, saving both the parent and the child after each child item is created. When this process completes, I try to move the parent and get theNodeIsOutOfDateException
.
What causes this exception and what is the best practice to avoid it?