Skip to content

AfterSaveEvent contains object to save and not the saved instance [DATAMONGO-2189] #3050

Closed
@spring-projects-issues

Description

@spring-projects-issues

Andrey Utkin opened DATAMONGO-2189 and commented

When inserting new entity (id==null) method onAfterSave of registered listener called with undefined id (passed entity has id field == null). In previous version (2.1.3) it was called with 'saved' entity with defined id.

 
It seems that regression was added with commit 

718a7ff

 - maybeEmitEvent(new AfterSaveEvent<>(saved, dbDoc, collectionName));
 + maybeEmitEvent(new AfterSaveEvent<>(initialized, dbDoc, collectionName));
 


Affects: 2.1.4 (Lovelace SR4)

Referenced from: pull request #638

Backported to: 2.1.5 (Lovelace SR5)

Metadata

Metadata

Assignees

Labels

in: coreIssues in core supporttype: bugA general bug

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions