-
-
Notifications
You must be signed in to change notification settings - Fork 49
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
updated_at timestamp gets current timestamp on model find/hydrate when record field is empty #268
Comments
@circulon can you give me some code examples of how to replicate this? |
when trying to replicate this it looks like I came across and issue where the updated_at was not even getting set when updating a record |
I think what you are saying that if record ID 1 has updated_at as NULL and you fetch the record it will actually hydrate as the current time stamp. Can you try again on latest version of the ORM? I think this may have been fixed already |
Yes thats exactly what I mean. I'm at work and will add and will test once im home and report back. |
Confirmed this issue is fixed in the current 0.9.1 release |
Ok cool. Yeah this was fixed in 0.9.0
|
Thanks for pointing this out |
when using the default for the timestamps attribute the updated_at attribute gets populated with the current timestamp if it is empty/null when selecting amodel record that has never been updated
thus providing a false positive of its actual "updated_at" status
The desired behaviour is to reflect the record field value ie None when populating a model object and the record field is empty
Currently having to disable auto handling of timestamps as queries based on updated_at sorting are not accurate.
The text was updated successfully, but these errors were encountered: