-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inside Deleted trigger all FK properties are null #63
Comments
It depends on the relationship defined on those foreign keys. The entity you access through the Deleted event parameters is the same as if you had the entity reference itself after it was deleted. If you can post a minimal example of the behaviour you're seeing and what you expect to see, that would be a good starting point to finding a solution. |
Thanks for your quick reply. Some background: I use triggers to intercept DB events and create JSON messages that being sent to another system for synchronization. |
I think you're right about the cascade delete behaviour. I think you can use the delete failed event to track whether the delete failed. |
I'm not sure if this is by design, but when Deleted trigger is fired, if entry.Entity has any foreign key fields, those fields are null.
This makes this handler very limited in it's usability. The only workaround I found is using Deleting trigger. Which is for obvious reasons is not ideal. I'm I missing something?
The text was updated successfully, but these errors were encountered: