Skip to content

CreatedAt/updatedAt #17

@MarioArnt

Description

@MarioArnt

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions