Index: lams_common/conf/hibernate/mappings/usermanagement/Role.hbm.xml =================================================================== diff -u -r6068cdbbfae51dc5bf1a0283ed408d4cca31677c -r13014ed9dc02a713ae3030b01a5f6c16cb3ba747 --- lams_common/conf/hibernate/mappings/usermanagement/Role.hbm.xml (.../Role.hbm.xml) (revision 6068cdbbfae51dc5bf1a0283ed408d4cca31677c) +++ lams_common/conf/hibernate/mappings/usermanagement/Role.hbm.xml (.../Role.hbm.xml) (revision 13014ed9dc02a713ae3030b01a5f6c16cb3ba747) @@ -74,13 +74,13 @@ name="userOrganisationRoles" lazy="true" inverse="true" - cascade="none" + cascade="delete-orphan" > @hibernate.set lazy="true" inverse="true" - cascade="none" + cascade="delete-orphan" @hibernate.collection-key column="role_id" Index: lams_common/conf/hibernate/mappings/usermanagement/UserOrganisation.hbm.xml =================================================================== diff -u -r6068cdbbfae51dc5bf1a0283ed408d4cca31677c -r13014ed9dc02a713ae3030b01a5f6c16cb3ba747 --- lams_common/conf/hibernate/mappings/usermanagement/UserOrganisation.hbm.xml (.../UserOrganisation.hbm.xml) (revision 6068cdbbfae51dc5bf1a0283ed408d4cca31677c) +++ lams_common/conf/hibernate/mappings/usermanagement/UserOrganisation.hbm.xml (.../UserOrganisation.hbm.xml) (revision 13014ed9dc02a713ae3030b01a5f6c16cb3ba747) @@ -61,13 +61,13 @@ name="userOrganisationRoles" lazy="true" inverse="true" - cascade="none" + cascade="all-delete-orphan" > @hibernate.set lazy="true" inverse="true" - cascade="none" + cascade="all-delete-orphan" @hibernate.collection-key column="user_organisation_id"