I think java.util.Date should be mapped to "Datetime" type in MySQL.
append.
In MySQL, there are five data type related to time.
Year,Date,Time,Datetime,Timestamp
Year contains only year.
Date contains year , month , date.
Time contains hour, minute seconds.
Datetime and Timestamp contain year,month,date,hour,minute,seconds.
Timestamp is updated automatically when record is updated.
But I don't think using java.sql.Timestamp is good idea.
java.util.Date is normally used to treat time in Scala or java.
No one expect that hour,minute,second information will be lost after
save when use java.util.Date.
And also when DBObject's datetime fields are defineded as
java.sql.Timestamp, it will be inconvenient to convert java.util.Date
to Timestamp to set field.
There is java.sql.Date class to represent SQL's "Date".
I think java.util.Date should be mapped to "Datetime" or "Timestamp"
and java.sql.Date is mapped to "Date".
thanks
On 12月15日, 午後12:42, Maxime Lévesque <maxime.leves...@gmail.com> wrote:
> You can use java.sql.Timestamp, Squeryl will map it to a datetime.
> Have you tried this ?
>
> ML
>
> 2011/12/14 takezoux2 <takezo...@gmail.com>