You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@airavata.apache.org by "Marcus Christie (JIRA)" <ji...@apache.org> on 2017/06/01 21:09:04 UTC

[jira] [Created] (AIRAVATA-2428) UserProfileRepository: Dozer doesn't map from long in Thrift model to Date in JPA model

Marcus Christie created AIRAVATA-2428:
-----------------------------------------

             Summary: 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


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
(v6.3.15#6346)