i get the error Someone else is already modifying the same data

0
Hi all, in my case a parent object is created with a mendix own "New” button.  Then i start creating new child objects which are connected to parent object with * – 1 association. Everytime i create a new child object i commit them also. But when i want to commit the third child object i got this error. It seems like a new transaction is started but i am not sure. In my local and on cloud its same. If i commit the parent object before creating child objects than I dont get this error and it works normal. I don't know how exactly works start/ end transaction java actions but i tried them but got nothing. Can anyone help me?
asked
1 answers
1

Hi Abdullah,

By default it is not a good idea to commit child-objects with an association to an uncommitted parent-object. This might result in issues with autocommitted objects. I'm wondering why you want to commit the child objects if you're not sure if the parent object will be committed or not. You might end up with orphaned objects.

My advice would be to implement the process in such a manner that you can either commit the parent first, or commit both parent and child objects at the same point in your process.

Greetings Martin

answered