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
beforeCreate
and Model Properties
#69
Comments
After looking at |
Actually, the blame is |
If you want to test it you have to check the latest git version, it will take some days before pushing a new version. Or you can use the hook |
Thanks! I've tested and it works when updating properties enumerated in the call to Person.create([{
email: 'test@email.com',
password: 'visible?',
salt: ''
}], /* ... */ |
Getters/setters for properties would not be correctly defined
Please try it now. |
This works however rangeLength validator is checking for Is it possible for an attribute to ever be undefined? Should the validation only be checking for null, or both null & undefined? |
You're right. To be consistent, it should initialize to undefined. |
…instance is already on database (#69)
I'm going to assume it's fixed. If you have any other problems please reopen or create a new issue :) |
Just tested--it works! Thanks |
Hi,
Thanks a lot for this project. I was wondering if I'm doing something wrong here—I expect to be able to modify the properties of a model in
beforeCreate
, but Postgres shows the following in the database:Testing with
beforeSave
yields different results for me, too: the password gets hashed, butsalt
andcreated
go unset in the database.The text was updated successfully, but these errors were encountered: