
Hibernate
文章平均质量分 59
iteye_1032
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
java.lang.ClassCastException: $Proxy8 incompatible with lin.dao.impl.ExchangeDao
Spring transaction practice, an error example: package lin;import lin.dao.impl.ExchangeDaoLocator;import lin.dao.impl.TestDaoLocator;import lin.domain.Exchange;import lin.domain.Test;...原创 2015-09-19 14:01:44 · 376 阅读 · 0 评论 -
Spring transaction manager example
ApplicationContext.xml<?xml version="1.0" encoding="UTF-8"?><beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmln...原创 2015-09-19 14:25:41 · 160 阅读 · 0 评论 -
Hibernate related
1. Cannot get .currentSession()org.hibernate.HibernateException: No Hibernate Session bound to thread, and configuration does not allow creation of non-transactional one here at org.springframewo...原创 2015-09-21 20:37:53 · 173 阅读 · 0 评论 -
SequenceHiLoGenerator HiLo算法
org.hibernate.id.SequenceHiLoGenerator HiLo算法即id=hi*(max_lo+1)+lo,lo值在1到max_lo直接循环,lo值每循环一圈,hi值就增一。可以这么理解max_lo(当然实际有一点差别,在于lo取值从1~max_lo,而不是0~max_lo-1): hi = id / max_lolo = id % max_l...原创 2013-12-25 19:17:32 · 475 阅读 · 0 评论 -
SQLQuery.setParameter() 绑定多个同样变量
String sql = "SELECT SYS_AUTO_GENR_CURR_DT FROM RBP_ASET_CLASS_DT WHERE CTRY_PROD_EXCHG_MKT_CDE = :exchange AND CTRY_PROD_EXCHG_MKT_CDE = :exchange" SQLQuery query = this.getSessionFactory().getC...原创 2016-10-14 12:40:03 · 3202 阅读 · 1 评论