commit 1 to 1 association

1
Can someone confirm me that if  create two object, link one to another(1 to 1 association), when I commit either one of them it will auto commit the other one?  If so, what is the best practice, to commit both to have a code more ‘readable’, or just one to improve performance?    Thanks.
asked
4 answers
3

Hi

Yes, It will autocommit the other one.It is best to commit both objects. Autocommit objects are not advisable. Please refer this below documentation for both more clarity on commit & autocommit objects.

https://docs.mendix.com/refguide/committing-objects

answered
5

Hi, the autocommit functionality as per the documentation works only when you create the association.

Meaning, if you have Object A and Object B, when you create Object and associate it with Object A then auto commit works. 

When you want to edit the object B or Object A, then autocommit does not have any effect. You have to commit it separately. 

So, it is wise to handle the commit yourself.

answered
3

It's best to commit both

answered
1

Thank you! 

answered