-
Notifications
You must be signed in to change notification settings - Fork 378
Closed as duplicate of#1899
Labels
status: waiting-for-triageAn issue we've not yet triagedAn issue we've not yet triaged
Description
I have an Entity where I am using Auditor fields createdBy and updatedBy
public record Parent(
@Id UUID id,
String title,
@MappedCollection(idColumn = "parent_id") Set<Child> children,
@CreatedBy UUID createdBy,
@LastModifiedBy UUID updatedBy)
If I add the auditor fields on to the nested entity:
public record Child(
@Id @Column("id") UUID id,
UUID parentId,
String name,
@CreatedBy UUID createdBy,
@LastModifiedBy UUID updatedBy)
they aren't populated when being insert into the database.
Is there no way this data can be propagated into the nested entities? Is this due to the simpler model JDBC uses over JPA?
If so, is there any recommendations on what to do instead?
I was thinking of adding them manually into the nested entities in my code.. at that stage I might as well add them to the root entity anyway and get rid of the Auditor altogether to be consistent.
Thanks!
Metadata
Metadata
Assignees
Labels
status: waiting-for-triageAn issue we've not yet triagedAn issue we've not yet triaged