- Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Labels
status: feedback-providedFeedback has been providedFeedback has been providedtype: taskA general taskA general task
Milestone
Description
i see that an Entity with @CreatedDate and @LastModifiedDate and other auditable annotations works nice when those attributes are in the same class annotated with @entity, but it doesn't seem to work when those are on a @Embeddable annotated class
@Embeddable public class Auditable { @CreatedDate private Instant cratedDate; @LastModifiedDate private Instant lastModifiedDate; ... }@Entity @EntityListeners(AuditableListener.class) //this works with embedded, it is a custom Auditable //@EntityListeners(AuditingEntityListener.class) //doesn't work for embedded public class EntityB implements AuditableEntity{ @Id @GeneratedValue private UUID uuid; private String randomAtt; @Embedded private AuditablePart auditablePart; ...it would be cool if it can be used a similar approach by using the same AuditingEntityListener.class in addition to a custom one
i made a demo project showing this
Metadata
Metadata
Assignees
Labels
status: feedback-providedFeedback has been providedFeedback has been providedtype: taskA general taskA general task