
Hibernate
爱上冬日暖阳
believe
展开
-
hibernate异常之自我总结
一、org.hibernate.StaleStateException: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1 原因:这个异常是由于主键设置为自增长,而在我们插入记录的时候设置了ID的值导致的。 解决方式:原创 2015-03-30 13:15:47 · 440 阅读 · 0 评论 -
springmvc4+springmvc4+hibernate4事务问题(全部都是用注解)
异常信息如下:org.springframework.dao.InvalidDataAccessApiUsageException: Write operations are not allowed in read-only mode (FlushMode.MANUAL):Turn your Session into FlushMode.COMMIT/AUTO or remove 'rea原创 2015-04-23 16:02:13 · 1945 阅读 · 0 评论 -
springmvc4+spring4+hibernate4注解开发,分页查询,表头排序,多条件模糊查询,查询自动补全功能
一、数据库create table if not exists t_student(student_id int primary key not null auto_increment,student_name varchar(30),student_age int ,student_address varchar(100),student_qq varchar(20)) engi原创 2015-05-01 23:22:53 · 4299 阅读 · 1 评论