Hi,
I’m trying to upload a file but it disappears from the database connected object class when I refresh.
In more detail what I’m doing is loading all files linked to one object into a runtime only object class.
The user can then make changes on the objects in the runtime only object class, i.e. add, remove files.
When the user is ready to save the changes first all objects in the database connected object class that are linked to the same object as before are deleted. Then the files from the runtime only object class are persisted. In the dev tools it looks as if the files are added to the database connected object class.
When I add a file and save it, all looks fine. Then I refresh and the file that was in the database connected object class before disappears.
Seems like the persist all does not work for objects that were deleted from the database connected object class just before. And yes, I added 500 ms of sleep just to be sure…
Yes this issue resembles: Object in the database connected datasource is gone on solution refresh - #8 by user8 but I don’t understand why “pending deletion” should affect whether a file can be persisted.
And what would be an alternative way to achieve the same result?