Skip to content

Generated entity identifier in BeforeSaveCallback upon insert is no longer applied in the INSERT statement #1232

Closed

Description

@mp911de

When setting an identifier in a BeforeSaveCallback, the entity id is not being considered in the actual INSERT statement. Specifically, the MutableAggregateChange is being created with a generated IdValueSource and after setting the changed entity, IdValueSource is not updated.

This is a breaking change. The workaround is to use BeforeConvertCallback. However, this should be at least documented in the release notes. Ideally, a generated identifier via BeforeSaveCallback would be still considered when updating the entity in the 2.x development line.

Activity

  1. added 2 commits that reference this issue on May 11, 2022
    60117f1
    0e590ad
  2. schauder commented on May 11, 2022

    @schauder
    Contributor

    Reintroduced the behavior with 60117f1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

type: regressionA regression from a previous release

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions