Open Closed

EntityDeletedEto with Cascade Delete Not Triggering #2153


User avatar
0
selinkoykiran created

Hello , We have an aggregate root with child entites. Aggregate root is related with entites with foreign key . We want to listen deletion event of these child entities. They are deleting with cascade mode, so when aggregate root is deleted their child entities also will be deleting. But with below implementation child entity deletion handler never triggering ? Note => By the way aggregate root event triggering is working fine. This situation is for cascadely deleted entities.

Thank you.

Check the docs before asking a question: https://docs.abp.io/en/commercial/latest/ Check the samples, to see the basic tasks: https://docs.abp.io/en/commercial/latest/samples/index The exact solution to your question may have been answered before, please use the search on the homepage.

If you're creating a bug/problem report, please include followings:

  • ABP Framework version: v4.4.4
  • UI type: MVC
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes / no
  • Exception message and stack trace:
  • Steps to reproduce the issue:"

4 Answer(s)
  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    But with below implementation child entity deletion handler never triggering ?

    This is the current design, you need to manually call the delete method of the Repository

  • User Avatar
    0
    selinkoykiran created

    Is this the abp design or it comes from Ef core ORM usage ? Because normally when you directly listen table changes from sql we can catch the changes. I understand that abp's pre-built events do not support this cascade deletion , right ?

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    I understand that abp's pre-built events do not support this cascade deletion , right ?

    Yes.

  • User Avatar
    0
    selinkoykiran created

    Ok, thanks for the information.

Made with ❤️ on ABP v9.1.0-preview. Updated on November 11, 2024, 11:11