i have a association between two tables A and B
B have a field which is the id of A (ID_AL) :
<!-- Associations -->
<many-to-one name="Livraison" class="org.ultimania.model.Livraison" column="ID_AL" cascade="save-update"/>
i make a save of A , and a flush()
and after a save of B (which contain A id)
then i make a flush() and i have a violation :
Ora-xxx : parent key not exist.
Because i have a integrity constraint :
ALTER TABLE COMMANDE ADD CONSTRAINT FKABBFA7A42509EE
FOREIGN KEY (ID_AL) REFERENCES PLSVISTA.LIVRAISON (ID_AL) ;
i think the cascade="save-update" will be suffisant or the flush after the save of A , but not i have still a violation and i can make a commit.
thank for your help
|