0

I have tested this:

dateCreated(sqltype: 'datetime')

and this

dateCreated column: 'DateCreated', sqltype:'datetime'

and neither of them works. I always get datetime2. Hope it's possible to solve.

SqlZim
  • 37,248
  • 6
  • 41
  • 59
larand
  • 773
  • 1
  • 9
  • 26
  • 1
    If the database already exists how are you "getting datetime2" – James Kleeh Mar 19 '17 at 03:34
  • Maybe I'm wrong, but I first want to test how the domain is mapped into a new database so I can compare how hibernate treat the mapping. And it always create the field as datetime2. And that cause me to believe that it won't work against the legacy db. I've tried to run against the legacy db but I got a lot of other error's that I can't handle so I don't know what's happening with the datetime. – larand Mar 19 '17 at 06:27
  • look at this question it might solve your problem http://stackoverflow.com/questions/29163911/use-datetime-instead-of-datetime2-sqlserver-hibernate – dynamo Mar 19 '17 at 15:53

0 Answers0