I do have 2 entities:
1. User
2. Limits
User has a set of limits, so one-to-many relation is present. I do have a cascade type set to delete
, so when User
is deleted, all corresponding limits should be deleted as well.
<bag name="limits" cascade="delete">
<key column="USER_ID"/>
<one-to-many class="com.mac.kom.modules.limits.models.LimitsModel" />
</bag>
When I try to delete the User
I do get an error
Caused by: java.sql.SQLException: ORA-01407: cannot update ("DB"."LIMITS"."USER_ID") to NULL
Any clues?