i experienced an issue and already found the source. So I was just wondering, if this was “supposed” to happen:
- I have an Order Entity with a relation to an OrderLine Entity (Composition).
- In the OrderLine Editor, i created a nested Datasource “OrderDs” ==> so basically the Foreign Key attribute of the OrderLine Entity.
- if i create a new Order, with new OrderLine Items and try to save the Order, I get an:
java.lang.IllegalStateException: During synchronization a new object was found through a relationship that was not marked cascade PERSIST
As soon as a save the new Order first, before adding the OderLine Items, it works. Also if i delete the nested Datasource of the OrderLine Editor, it also works without saving the Order first.
Is this supposed to happen?