GoogleCloudPlatform / GoogleCloudPlatform/spring-cloud-gcp

Support @CreatedDate for Datastore auditing

Open
#534 2 comments 0 reactions 0 assignees View on GitHub
datastore good first issue priority: p3 type: enhancement
Dominant language
Java
Stars
551
Forks
349
Avg merge
1d 13h
Merged PRs (30d)
14

Description

Migrated from: https://github.com/spring-cloud/spring-cloud-gcp/issues/1809

Currently we only support `@LastModifiedDate`, and do not support `@CreatedDate` because it's difficult to know if the entity is being created when saving unless we do a second request to check if that ID already exists. We also cannot rely on the entity ID being NULL, because the users can set the ID for new entities as well.

The proposal is to support `@CreatedDate` based on the NULL ID, and clearly document that it will not work if you set the ID manually.

@Alos

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.