cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vincent Smith <>
Subject Handling Sql Server datetimeoffset column type
Date Wed, 30 Sep 2015 18:48:52 GMT
I am using Cayenne 3.0 and Sql Server 2014. I have a column in my sql Server schema with a
type of datetimeoffset. My problem is this. Cayenne can convert that column into a java.util.Date
without error, but I lose the hours, minutes, and seconds precision. When I try to use java.sql.Timestamp,
I get the following error:

java.sql.SQLException: Value 2015-09-28 11:15:18.4170238 -05:00 cannot be converted to TIMESTAMP.

Is there any Cayenne type I can use to convert a datetimeoffset into a java Timestamp or Calendar
object and maintain the hours, mins, and seconds?

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message