Entity gets saved too early

Hi there!

I got an entity called “User” and an entity called “FurtherActivity”. One User can have many FurtherActivity’s (OneToMany Association).

The problem: I open the User Edit Screen. I add a new Further Activity. The Further Activity Editor opens. I click “OK”. I then click on the “Cancel” Button in the User Edit Screen. But despite I click on “Cancel” the Further Activity gets saved.

How do I change that the Further Activity gets saved in the same transaction like the User?

image

image

Hi Rene,

This problem is solved using the CUBA “composition” feature. Please take a look at these recipes: Composite Structures.

1 Like