Replies: 2 comments 2 replies
-
@thetutlage any idea? |
Beta Was this translation helpful? Give feedback.
0 replies
-
Hooks are not the way to go here. We will have proper support for global scopes, which serve the use case of softDeletes. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi.
I implemented softDeletes using the example shown here (@Obapelumi):
#1791 (reply in thread)
Everything works perfectly fine! But the withCount method is not applying softDeletes hooks.
SoftDeletes.ts [Trait]
Order.ts [Model]
OrderItem.ts [Model]
OrdersController.ts [Controller]
I reviewed the code of the withCount method (@adonisjs/lucid/build/src/Orm/QueryBuilder/index.js) and after a lot of fighting, I applied a "solution" made in Brazil ;-).
The solution (before run select):
Is it possible and feasible to add this solution?
Is my analysis correct that I should apply hooks in this scenario?
Tks 4 all
Beta Was this translation helpful? Give feedback.
All reactions