Sachin Kariyattin commented on AIRAVATA-2428:

The linked PR contains a custom dozer mapper implementation which converts the 
updateDate (long) from a thrift data model to updateDate (TIMESTAMP) of an 
entity. Similarly, other mappings can be added to the dozer_mapping.xml file. 

> UserProfileRepository: Dozer doesn't map from long in Thrift model to Date in 
> JPA model
> ---------------------------------------------------------------------------------------
>                 Key: AIRAVATA-2428
>                 URL: https://issues.apache.org/jira/browse/AIRAVATA-2428
>             Project: Airavata
>          Issue Type: Bug
>            Reporter: Marcus Christie
>            Priority: Major
>              Labels: newbie
> This affects UserProfileRepository but it is such a common problem that it 
> probably affects or will affect several other such mappings.
> The Thrift model class UserProfile.java has {{long}} fields {{creationTime}}, 
> {{lastAccessTime}} and {{validUntil}}. These long fields represent dates.  
> These are mapped in the database using the UserProfileEntity.java JPA model, 
> but these fields are mapped as {{Date}}s. That's good that they are mapped as 
> Dates, but Dozer doesn't have a default conversion from long -> Date.
> I think we should add a custom conversion so that Dozer can map from long -> 
> Date (and vice versa).

This message was sent by Atlassian JIRA

Reply via email to