[2.0.1 - java] How to set column as date and not datetime in ebean

357 views
Skip to first unread message

abhishek

unread,
Jun 27, 2012, 8:17:33 AM6/27/12
to play-fr...@googlegroups.com
hi,
If i use java.util.date in my Entity the corresponding column created in mysql table is DateTime, i want Date!

Please help,

thanks
aj

abhishek

unread,
Jun 28, 2012, 10:08:34 AM6/28/12
to play-fr...@googlegroups.com
Hi,
An update @Temporal(TemporalType.DATE) on java.util.Date dont work , it still creates Datetime on mysql on ebean .

Thanks
aj

Kevin Bosman

unread,
Jun 28, 2012, 10:47:42 AM6/28/12
to play-fr...@googlegroups.com
> An update @Temporal(TemporalType.DATE) on java.util.Date dont work , it still creates Datetime on mysql on ebean .

Have you tried @Column(columnDefinition = "date")

Marco P.

unread,
Jun 28, 2012, 11:45:21 AM6/28/12
to play-fr...@googlegroups.com
Kevin,
I have  similar problem, your advice works, now in H2 I have Date and not TimeStamp, but I have still this problem:
if I parse "28-06-2012" I have different result from new Date() [Ebean still see the difference in time]. I could set up a workaround but
i really would like a clean solution :-)

Thanks anyway.
Reply all
Reply to author
Forward
0 new messages