Announcement

Collapse
No announcement yet.

Is there any way to trigger hooks while using ORM Query Builder?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Is there any way to trigger hooks while using ORM Query Builder?

    When you follow any record, followEntity method creates a new record in the Subscription table. AfterSave hook of the subscription entity is triggered since createEntity method is being used.
    But when you unfollow the record, unfollowEntity method deletes the record from the Subscription table. None of the subscription hook methods like afterRemove or beforeRemove are triggered because unfollowEntity uses ORM delete query builder to delete the record instead of the removeEntity method.

    Is there any way to trigger hooks while using the ORM delete query builder?

    Like:
    1. beforeDelete or afterDelete methods in the hooks (these methods don't exist in the latest version, not sure if they did before)
    2. afterDeleteEntity in custom subscription controller or services.

  • #2
    Not possible. You can trigger hooks manually. But it's unlikely what you need.

    Comment

    Working...
    X