Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Entities may be annotated with
@Id
and@Embedded
, resulting in a composite id on the database side.The full embedded entity is considered the id, and therefore the check for determining if an aggregate is considered a new aggregate requiring an insert or an existing one, asking for an update is based on that entity, not its elements.
Most use cases will require a custom
BeforeConvertCallback
to set the id for new aggregate.For an entity with
@Embedded
id, the back reference used in tables for referenced entities consists of multiple columns, each named by a concatenation of +_
+ .E.g. the back reference to a
Person
entity, with a composite id with the propertiesfirstName
andlastName
will consist of the two columnsPERSON_FIRST_NAME
andPERSON_LAST_NAME
.This holds for directly referenced entities as well as
List
,Set
andMap
.Closes #574