Behaviour of nestedDatasource commit different for new/edit/remove?

Hi, I wanted to check the default behaviour on commit of nestedDatasources.

I am using nestedDatasource for associations (not compositions) in an Edit Screen. (The reason I do this is because properties of the nestedDatasource linking to the masterDatasource will be populated automatically when creating new instance).

When I create a NEW entity instance in the nestedDatasource, it is commited as soon created (i.e. even if I don’t click save in the Edit Screen).
However, if I EDIT or REMOVE an entity instance in the nestedDatasource, it is only commited if I click Save in the masterDatasource Edit Screen.

I thought that when NestedDatasources where ASSOCIATIONS, all changes would be commited as soon as the NestedDatasource entity is edited/removed. Is this behaviour correct?

Hi Matthis,

Any datasource commits its changed entities only when it is given a command - usually when a user clicks “OK” in the editor screen. The difference between ASSOCIATION and COMPOSITION is that in the former case the datasource commits directly to the database and in the latter case to a parent datasource.

So if you use a NestedDatasource with ASSOCIATION collection, the editor opened for instances of the collection should commit directly to the database both for Create and Edit operations. The Remove operation should also remove the instance from the database right away.

If it doesn’t work for you, please attach a sample project reproducing the issue.