随笔分类 - hibernate
摘要:hibernate 执行SQL语句字符串常量类型变成了 character 解决办法 1重写Dialect public class SQLServerDialect extends org.hibernate.dialect.SQLServerDialect{ public SQLServerDi
阅读全文
摘要:多表返回实体 List<Object> resultList = db.query( "from Blog as t0,Usertable as t1 where t0.userId=t1.id").list();// HQL的多表查询 for (int i = 0; i < resultList.
阅读全文
摘要:<dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-core</artifactId> <version>5.1.8.Final</version> </dependency> <!-- for JPA, use h
阅读全文