-
Notifications
You must be signed in to change notification settings - Fork 367
Closed
Labels
type: bugA general bugA general bug
Description
The JdbcAggregateTemplate#save
method is expected to return the saved aggregate root with the combined result of the following:
- Properties set on the aggregate being saved.
- Properties that may be set on the aggregate by the
BeforeConvertCallback
. - Properties that may be set on the aggregate by the
BeforeSaveCallback
. - Generated ids for entities that form the aggregate.
Currently the AggregateChangeExecutor#execute
method that is called from the JdbcAggregateTemplate
either returns the entity on the AggregateChange
or the entity on a DbAction.InsertRoot
action. This yields an instance with the same properties set under most situations but diverges when the BeforeSaveCallback
returns a different instance, for example by updating an immutable property. In this scenario, the return value of AggregateChangeExecutor#execute
is the aggregate root with the results of (1), (2), and either of (3) OR (4) from the above, depending on whether the @Id
annotated property of the root is mutable.
Metadata
Metadata
Assignees
Labels
type: bugA general bugA general bug