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

New property doesn't get added to redis hash on update #185

Open
maritz opened this issue Sep 8, 2022 · 0 comments
Open

New property doesn't get added to redis hash on update #185

maritz opened this issue Sep 8, 2022 · 0 comments
Labels

Comments

@maritz
Copy link
Owner

maritz commented Sep 8, 2022

When adding a new property that has a defaultValue (or setting it to null when no defaultValue is set) to an existing model instance and then saving it (so it's an update, not a create), the value is not written to the DB.

This causes issues with indexing down the line, at the very least.

As a temporary workaround, one needs to add a migration that first sets the value to a non-default on all existing instances and then sets the default again.

@maritz maritz added the Bug label Sep 8, 2022
@maritz maritz assigned maritz and unassigned maritz Sep 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant