Reacting to a Collision

If a collision is detected, NDO does not store the data row in the database. Instead the PersistenceManager tries to trigger a CollisionEvent. An NDO Exception is thrown if no event handler is registered. To handle the collision event you should cancel the transaction with the function PersistenceManager.Abort(). You can then duplicate the object as a transient object (or otherwise save the object state) and load the changed state from the database. These two object versions can be displayed to the user who is then able to decide which version he wants to store in another transaction.