Skip to content
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

Base Model #72

Open
targos opened this issue Jun 22, 2021 · 5 comments
Open

Base Model #72

targos opened this issue Jun 22, 2021 · 5 comments

Comments

@targos
Copy link
Member

targos commented Jun 22, 2021

https://docs.adonisjs.com/reference/orm/base-model

@targos
Copy link
Member Author

targos commented Jul 8, 2021

TODO:

@targos
Copy link
Member Author

targos commented Jul 8, 2021

Question: should queries sort by default?

@stropitek
Copy link
Contributor

Model.query().distinct()

@targos
Copy link
Member Author

targos commented Jul 10, 2021

Should we also define fields using decorators? The current approach is simpler, but introduces issues, like it is impossible to type the precise list of fields that are saved to the DB, or to implement custom serialization like Lucid.
We could use @field for normal fields (instead of @column).

@targos
Copy link
Member Author

targos commented Jul 12, 2021

Decorators such as beforeSave, beforeCreate, ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants