Skip to content
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

Auditor attempts to set lastModifiedDate on null object [DATACMNS-1669] #2089

spring-projects-issues opened this issue Feb 18, 2020 · 1 comment
in: mapping status: duplicate type: bug


Copy link

spring-projects-issues commented Feb 18, 2020

Blake opened DATACMNS-1669 and commented

The same example given in for @CreatedDate is still an issue for @LastModifiedDate:

Given two classes where ClassB contains @LastModifiedDate property and is referenced by ClassA:

@Document(collection = "ClassA")
public class ClassA
    private String id; 

    private ClassB other; 

public class ClassB
    private Instant created; 

    private Instant modified; 

An attempt to store an instance of ClassA when other is null fails with a MappingException: Cannot lookup property private ClassB ClassA.other on null intermediate! Original path was: other.created on ClassA.

Given @CreatedDate was fixed it, seems @LastModifiedDate should also be fixed since it is common to track both a created and modified date

Affects: 2.1.15 (Lovelace SR15), 2.2.4 (Moore SR4), 2.3 M3 (Neumann)

Reference URL:

Issue Links:

  • DATACMNS-1671 Auditor attempts to set created date on null object
Copy link

spring-projects-issues commented Feb 24, 2020

Mark Paluch commented

Closing this ticket as a duplicate of DATACMNS-1671

@spring-projects-issues spring-projects-issues added type: bug status: duplicate in: mapping labels Dec 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
in: mapping status: duplicate type: bug
None yet

No branches or pull requests

2 participants