You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@deltaspike.apache.org by "Nico Schlebusch (JIRA)" <ji...@apache.org> on 2018/07/06 12:24:00 UTC

[jira] [Commented] (DELTASPIKE-1229) Allow the use of @Alternative to implement a custom TimestampsProvider

    [ https://issues.apache.org/jira/browse/DELTASPIKE-1229?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16534763#comment-16534763 ] 

Nico Schlebusch commented on DELTASPIKE-1229:
---------------------------------------------

Hi [~johndament], any indication of when this issue will get priority or assigned to a specific version?

> Allow the use of @Alternative to implement a custom TimestampsProvider
> ----------------------------------------------------------------------
>
>                 Key: DELTASPIKE-1229
>                 URL: https://issues.apache.org/jira/browse/DELTASPIKE-1229
>             Project: DeltaSpike
>          Issue Type: New Feature
>          Components: Data-Module, JPA-Module
>    Affects Versions: 1.7.2
>         Environment: Deltaspike 1.7.2. CDI 1.1 Wildfly AS 9.0.2.Final
>            Reporter: Nico Schlebusch
>            Assignee: John D. Ament
>            Priority: Major
>
> I'm using the JPA {{@EntityListeners(AuditEntityListener.class)}} and the audit functionality of Deltaspike Data ({{@CreatedOn}}, {{@ModifiedOn}} and {{@ModifiedBy}} annotations) on an entity bean with the difference that I have a custom implementation of {{java.time.ChronoLocalDateTime}} which converts any {{LocalDateTime}} + {{ZoneOffset}} OR a {{ZonedDateTime}} to be the UTC date & time.
> Is there a way to implement my own {{org.apache.deltaspike.data.impl.audit.PrePersistAuditListener}} and {{org.apache.deltaspike.data.impl.audit.PreUpdateAuditListener}} and use them to create the instance of {{UTCDateTime}} required by he fields marked with {{@InsertedOn}} and {{@ModiefiedOn}}?
> See this [SO Question|http://stackoverflow.com/questions/41057116/deltaspike-data-cdi-jpa-custom-prepersistauditlistener-and-preupdateauditlis] and the discussion on this [mail thread|https://lists.apache.org/thread.html/c47a6187d03fc8f665c6b3c7ab760e80084db3b8d4f83fe9d34015d8@%3Cusers.deltaspike.apache.org%3E]



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)