使用Hibernate , SQL Server 2008將 Date存到datetime欄位中會遺失時間資訊,只剩下日期。如下:
2010-11-02 00:00:00.000
原有設定:
bean-hbm.xml
需使用sql-type 來複寫Hibernate default mapping。
The sql-type attribute allows the user to override the default mapping of a Hibernate type to SQL datatype.
(hibernate reference 3.3.2 GA)

2010-11-02 00:00:00.000
原有設定:
bean-hbm.xml
需使用sql-type 來複寫Hibernate default mapping。
The sql-type attribute allows the user to override the default mapping of a Hibernate type to SQL datatype.
(hibernate reference 3.3.2 GA)
留言