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.
there i am again. I found another Issue, which i don’t know how to get rid of. I have attached a sample Project (Cuba v6.9.5), which shows the error.
Let me just explain it:
The Sample Data Model Consists of:
“Order” Entity which has a One-to-Many Composition of the “OrderLine” Entity.
“OrderLine” Entity has a One-to-Many Composition of the “OrderLinePosition” Entity.
Following Issue:
I create a Order
I add an Order Line
Next up I’am adding a Order Line Position
The moment i try to add (click OK in the OrderLine Editor) the Order Line, i get the following Error:
I have attached the given Project to this Reply. Please let me know if you need any further information.
I need this functionality in a coming production application (father - Son - grandson, one-to-many composition). A workaround would also do the job for me.