I got the following error in an application: 2014-09-01 10:56:30.174 ERROR - ConnectionBus_Retrieve: The association 'some_association' of object 'some_object' with data store id '34902897112121847' refers to a non-existing object 'some_other_object' with data store id '36028797018965073'. 2014-09-01 10:56:30.179 ERROR - Connector: An error has occurred while handling the request. [User 'user' with session id 'f4ca496e-c48f-4fbd-a7c8-9d0e56d76d61' and roles 'role'] 2014-09-01 10:56:30.179 ERROR - Connector: java.lang.ClassCastException: java.lang.Long cannot be cast to com.mendix.systemwideinterfaces.core.IMendixIdentifier This happens when I show a data grid of objects of type some_object and an attribute of the associated object of type some_other_object. The association between these two objects is 1-1. How is it possible the database gets in such a state? How can an object be deleted, but the references to that object remain? Could this be related to locking, where e.g. I lock the some_object, the some_other_object is autocommitted, and the user logs out? Is this a bug in the platform?
Rom van Arendonk
This must be a bug in the platform, unless you manually edit your database which I'm assuming you don't it should never get in this state. It might be hard to reproduce though so my guess right now is as good as yours. It should not be possible for the one object to succeed in committing while the other fails due to locking as this is done in a transaction.
Sebastiaan van den Broek
I've traced the problem to the following sequence of steps:
Existing object A
In a microflow: Create object B1, associate to A via 1-1 relationship
In a microflow: Delete object B1, commit object A, create a new object B2, associate to A via 1-1 relationship
In a microflow: Rollback object B2, Rollback object A
The result is that object A now refers to a deleted object B (both of them have been deleted, but A refers to B1). I will file a bug report for this.