You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a model defines updated_at field of type Long, the value of updated_at should always be automatically set to the current time when the model is modified.
Observed
When the model is loaded, if the updated_at column is null in the database, it will be null in the model's field and it will not be set to the current time when the model is modified.
I think the issue is within AbstractDatabaseModel#updatedAtCanBeHandled1. When the value of the field is null, it is unable to determine the type of the field. A possible solution is to add a getFieldType method that returns the type's Class.
Possible Workaround
A workaround for this is to explicitly set the value of the updated_at field to 0L. This allows Jack to confirm updated_at is of type Long and it will overwrite the 0 with the current time.
The text was updated successfully, but these errors were encountered:
Expected
When a model defines
updated_at
field of type Long, the value of updated_at should always be automatically set to the current time when the model is modified.Observed
When the model is loaded, if the
updated_at
column is null in the database, it will be null in the model's field and it will not be set to the current time when the model is modified.I think the issue is within
AbstractDatabaseModel#updatedAtCanBeHandled
1. When the value of the field is null, it is unable to determine the type of the field. A possible solution is to add a getFieldType method that returns the type's Class.Possible Workaround
A workaround for this is to explicitly set the value of the updated_at field to
0L
. This allows Jack to confirm updated_at is of type Long and it will overwrite the 0 with the current time.The text was updated successfully, but these errors were encountered: