Updating SQL data with TreeMultitableConnector

Hello, I’m having issues with the TreeMultitableConnector.

I am getting data from two different mysql tables. One table is put on level 0 and the other is for level 1. I have it rendered with a switch statement just like in the docs for the TreeMultitableConnector.

I have the tree connected to a dataprocessor. When I save it using dp.sendAllData() the $tree->getlevel() is stuck at whatever level the first item is. This makes me only able to save level 0 items or level 1 items but not both at once.

Is this how it’s intended to work or is there a problem here?

Are you using auto-update mode on the client side ?
In case of auto-update data saving will be executed after each change in the client side grid, and server side will process one update operation per script call - so level of item and related table must be detected correctly.

I am not using auto update. I’d prefer to save everything all at once when the user clicks a save button. So the only way for TreeMultitableConnector to update items would be send them individually?

Current implementation detects the level of item only once per update, so it will not work correctly, when update includes multiple items from different levels.

Stating this in the documentation would be helpful.