Hi,
I had a problem a while ago i got row updated or deleted error. I found out what my problem was, i checked the always load objects radio button, in the Business Data Modell editor and had a structure like this:
Owner
Car
Wheel
The Owner has multiple Car objects, and the Car objects has multiple wheel objects. If i set this to always load objects, then in the entity the connection between these objects will be eager. When i try to modify one Car then since it is set to eager it will version the wheels as well. And if i try to modify another car with the same wheel at the same time, then the row was updated or deleted error kicks in.
But if i turn the always load to only load objects when needed, then it will work fine, since it wont version the wheels just because i changed the car.
Now that i understand how this works, i have my question that will probably make sense, on my forms i took advantage of the eager loading. If i turn it to only load... then my forms wont work because my owners will only have a link for the cars, and then the cars will also have a link to the wheels.
My question is what could you advise? What is the best solution to make my forms work if i for example wanted to show the user a list of cars with the wheels at the same time? Is there a way to do it? Normally i would have a link for the wheels, but if i have multiple cars then it isnt easy and also not efficient to load all those links at the same time. If i have 50 cars with 4 wheels each, then it would call the server 200 times in a row.
Is there an efficient way to do this? I thought of creating my own API extension, that creates a response with the full JSON like it was an always load connection. But then i have to make one for all my calls.
Or maybe is there a way to configure the Jackson? (i think Bonita uses Jackson) So that it gives back even the lazy loaded objects as JSON?