[
https://issues.apache.org/jira/browse/CAMEL-12334?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Zoran Regvart resolved CAMEL-12334.
-----------------------------------
Resolution: Fixed
The defaults of DTO generation have changed. The new defaults when generating
Salesforce DTOs are:
* java.time.ZonedDateTime for dateTime
* java.time.OffsetTime for time
* java.time.LocalDate for date
We also have a new {{customTypes}} setting in the
{{camel-salesforce-maven-plugin}} to control which Java types are used for
Salesforce types when generating the DTOs.
Salesforce component now supports the following types:
* java.util.Date
* java.time.Instant
* java.time.LocalDate
* java.time.ZonedDateTime
* java.time.OffsetDateTime
* java.time.OffsetTime
Some of this can be used to the determent of serialization/deserialization. For
instance using {{java.time.ZonedDateTime}} for {{time}} or {{date}} values
won't work.
> 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)