Hibernate
Xiuye_XY
Nothing
展开
-
数据库的char和varchar/varchar2
数据库中的char分配多少位,查询条件就是多少位,写入数据的时候,不足的补空格,而varchar/varchar2则是按需分配,不足位数,不补空格,查询条件不需补足位数。明明查询语句是对的,条件也是对的,为啥查不出结果,是不是因为char补位数“空格”,该死的char类型!原创 2016-10-14 14:04:26 · 443 阅读 · 0 评论 -
spring整合hibernate加sqlite数据库
package com.xiuye.dialect;import java.sql.Types;import org.hibernate.MappingException;import org.hibernate.dialect.Dialect;import org.hibernate.dialect.function.SQLFunctionTemplate;import org.h原创 2016-07-28 09:32:51 · 1772 阅读 · 0 评论 -
数据库空表也能查询到一条数据
select sum(inout) as sum from UserTable;查询空表会有一条数据,只是值为空(不是null)而已原创 2017-07-29 18:36:54 · 2143 阅读 · 0 评论 -
Spring MVC + Mybatis (@Transactional) + Hibernate (AOP)
<beans default-lazy-init="true" xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/cont...原创 2018-04-16 20:18:52 · 230 阅读 · 0 评论