diff --git a/entity/Notification_entity/Notification_entity.aod b/entity/Notification_entity/Notification_entity.aod index 32689181066c4c089b9cb02d88ba84063f371310..e337c20729da7f4ec81700f9c180257929b0c5e0 100644 --- a/entity/Notification_entity/Notification_entity.aod +++ b/entity/Notification_entity/Notification_entity.aod @@ -166,6 +166,7 @@ <fromClauseProcess>%aditoprj%/entity/Notification_entity/recordcontainers/db/fromClauseProcess.js</fromClauseProcess> <conditionProcess>%aditoprj%/entity/Notification_entity/recordcontainers/db/conditionProcess.js</conditionProcess> <orderClauseProcess>%aditoprj%/entity/Notification_entity/recordcontainers/db/orderClauseProcess.js</orderClauseProcess> + <onDBDelete>%aditoprj%/entity/Notification_entity/recordcontainers/db/onDBDelete.js</onDBDelete> <linkInformation> <linkInformation> <name>c4e34b96-6081-4d04-8377-040a8ed3e14c</name> diff --git a/entity/Notification_entity/recordcontainers/db/onDBDelete.js b/entity/Notification_entity/recordcontainers/db/onDBDelete.js new file mode 100644 index 0000000000000000000000000000000000000000..05d1a30c0a4efc49d64aab055ed9b58109aba6f6 --- /dev/null +++ b/entity/Notification_entity/recordcontainers/db/onDBDelete.js @@ -0,0 +1,5 @@ +import("system.vars"); +import("system.notification"); + +// Deletes notificationContents from its table, if there are no +notification.deleteContentIfOrphan(vars.get("$field.ID"), vars.get("$field.CONTENTID")); \ No newline at end of file