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

Make @field() mandatory for database fields? #136

Open
targos opened this issue Mar 1, 2023 · 0 comments
Open

Make @field() mandatory for database fields? #136

targos opened this issue Mar 1, 2023 · 0 comments

Comments

@targos
Copy link
Member

targos commented Mar 1, 2023

We're not sure we actually want this, but the current behavior (which forwards all non-special get/set operations to the $attributes) can be risky:

  • It's possible to add unwanted fields to the documents by mistake (when any is involved)
  • If a user wants to use internal class fields, they have to use #private JS fields or Symbols, otherwise save() will persist them to the database.
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

1 participant