You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Any attributes that don't fit into the model will be placed into: $extras
If you want to override this behavior, and have the total with the other attributes on serialization, you could define a custom extras serializer in a model, like so:
Package version
@adonisjs/lucid 21.1.0
Describe the bug
Hello 👋,
For a
count('*', alias)
query, the result cannot be retrieved directly with the alias. You have to use the$extras
field.Database engine : MySQL 8.0.39 (Homebrew)
OS : macos14.4 (arm64)
MySQL Client NodeJS : mysql2 3.10.3
Thanks 😀
Reproduction repo
No response
The text was updated successfully, but these errors were encountered: