I got similar problems in my current project and casting to java.util.Date was not an acceptable workaround because I need microsecond precision. What I did was using base class Object in my constructor then casting it to Timestamp. For example: public EmployeeDto(String name, Object lastUpdated) { this.name = name; this.lastUpdated = (Timestamp) lastUpdated; } |