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

ASF GitHub Bot commented on CAMEL-12334:
----------------------------------------

zregvart opened a new pull request #2263: CAMEL-12334: Allow customizations of 
date/time types in generated DTOs
URL: https://github.com/apache/camel/pull/2263
 
 
   This adds support for using any of the following date/time classes:
    - java.util.Date
    - java.time.Instant
    - java.time.LocalDate
    - java.time.ZonedDateTime
    - java.time.OffsetDateTime
   
   With this all usage of Jackson `ObjectMapper` and `XStream` instances
   goes through the single utility method in `JsonUtils` or `XStreamUtils`
   in order to register default serializers/deserializers/converters.
   
   With this customized types can be used instead of default ones for
   fields in generated Java DTO classes. The Salesforce Maven plugin now
   supports specifying `customTypes` property, for instance:
   
   ```xml
   <plugin>
     <groupId>org.apache.camel</groupId>
     <artifactId>camel-salesforce-maven-plugin</artifactId>
     <configuration>
       <!-- ... -->
       <customTypes>
         <date>java.time.LocalDate</date>
       </customTypes>
     </configuration>
   </plugin>
   ````
   
   @hemangajmera I've opted to remain on defaults, a lot of client's code would 
break otherwise, and allow type customizations instead. Can you have a look?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


> Salesforce DTO does not use correct datatype for "date" and "time" field
> ------------------------------------------------------------------------
>
>                 Key: CAMEL-12334
>                 URL: https://issues.apache.org/jira/browse/CAMEL-12334
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-salesforce
>    Affects Versions: 2.20.2
>            Reporter: Hemang Ajmera
>            Assignee: Zoran Regvart
>            Priority: Major
>              Labels: maven
>             Fix For: 2.22.0
>
>
> The DTO classes generated by the Maven plugin uses ZonedDateTime for all three
>  * datetime
>  * date
>  * time
> The generation works fine, but is is not able to marshal/unmarshal correctly.
> The DTO should use different kind of field. My suggestion is to use
>  * ZonedDateTime for datetime
>  * LocalDate for date
>  * LocalTime for time
>  



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

Reply via email to