Hi, We have one-to-many relationship between Asset->Specifications. We are trying to create multiple specifications programmatically in the edit screen of Asset entity (New Entity). We are facing two problems.
- It gives error “During synchronization a new object was found through a relationship that was not marked cascade PERSIST”. Though for any saved entity, multiple specification entities are created. After adding CascadeType Persist on both side of relationship, it giver error “PK violation Error”.
- Another problem is after adding multiple specification, they do not appear in specification table immediately and will appear only when the screen is closed and open again.
- The one side of entity can not be deleted if many side entities are there. Though we have provided FK Constraint Action → Cascade on many side of relationship.
Thanks