You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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!
The text was updated successfully, but these errors were encountered:
I have an Entity where I am using Auditor fields createdBy and updatedBy
If I add the auditor fields on to the nested entity:
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!
The text was updated successfully, but these errors were encountered: