-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Labels
Description
It would be useful to have automatically generated fields createdAt and updatedAt that are kept up to date when entities are updated.
class MyModel extends Model<unknown> {
autoCreatedAt = true; // false in super class
autoUpdatedAt = true; // false in super class
}The createdAt is set at the initial creation and remains unchanged. It is set only when using DocumentClient.create method. And the validity of the field is not maintained by dynamodels on DocumentClient.save.
Please make sure to update the updatedAt during subsequent calls to the DocumentClient.update and DocumentClient.save methods.