
hibernate
tc@zen123
这个作者很懒,什么都没留下…
展开
-
hibernate获取connection
/** * 得到session * @return */ public static Session getSession(){ // get session Session session = getSessionFactory().openSession(); return session; } public static Connecti原创 2014-01-10 15:27:03 · 1846 阅读 · 0 评论 -
can not be represented as java.sql.Timestamp
使用hibernate开发程序的时候,有的时间字段没有必要填写,但是,以后hibernate查询的时候会报出 “java.sql.SQLException: Value '0000-00-00' can not be represented as java.sql.Timestamp” 的错误, 这是因为hibernate认为这个不是一个有效的时间字串。 而有效的日期格式为“ 0转载 2014-08-21 20:35:26 · 1026 阅读 · 0 评论