On delete of Object not working properly

0
We encounter an issue with the On delete of Object property that can be set on an association. In a specific case we have set it to: Delete X object only if it is not associated with Y object(s) and display error message Z. In some cases however the Error message Z is displayed (and blocking delete) while object X does not have an association with any object Y. I have checked the database table of the association (no link found) and also when using a microflow (association) retrieve no records are returned. Did anyone ever encounter this? Could I maybe doing something incorrectly? EDIT: Found the answer. Mendix behaviour is fine. It turns out that X contained a specialization that was related via another association (A) to another record (B) which is also a (n other) specialization of object X. Association A was set to On Delete also delete the related object. So by deleting X automatically B had to be deleted as well. While X did not contain Y objects, B actually did contain Y objects, so the error message was in fact correct (however applicable to another related object). Another reason to try to prevent using this functionality. :)
asked
0 answers