When you have two objects that are associated 1 to 1 to each other then they will both be committed if you commit either one. This behaves similarly to the what the documentation describes between a child as the owner of the association to the parent. When the child is committed the parent is also committed because it was the owner of the association. In a 1 to 1 since they are both the owner, you can commit either one and the other will be committed.
You can test this by creating two entities with a 1 to 1 association and debugging them as you set the association to one another.
In this example I have an entity called "entity" and thats associatied to "entity_2" by a 1 to 1 association. Before I create entity_2 and associated it to entity, the association is empty. Once I created entity_2 the association on both sides are set.
Then if I were to commit one of these objects, the other will be committed as well.
Hope this helps!
Is this also true for relations between non persistent and persistent objects?
For future reference:
When object A has a relation directed to object B (either * – 1 or * – *). When only object A is committed, object B is autocommitted
When object A has an undirected relation with object B (either 1 – 1 or * – *). When only object A is committed, object B is autocommitted
When object B has a relation directed to object A (either * – 1 or * – *). When only object A is committed, object B stays instantiated (not autocommitted)
This is especially important with entities that inherit from filedocument. Since Mendix commits the filedocument itself after uploading, all entities the filedocument child relates to will be autocommitted.