Hibernate 的Map 用起来的确方便,但是对字段的命名,可能是 aj_key和aj_value,这样不好。
另外发现,hibernate3,不能根据map的key查value。不得不把Map都查出来,在内存里查找。
hql="select elements(p1.variablesEncode) from ProcessInstance p1 where p1.dbId = 145 and index(p1.variablesEncode)='"
+ AutojobConstants.$BusiPathHasErr$ + "'"
生成的mysql的sql:
select variablese3_.aj_mapvalue from aj_processinstance processins2_, aj_pi_variables variablese3_, aj_pi_variables variablese4_ where processins2_.aj_dbid=variablese3_.aj_pi_dbid and processins2_.aj_dbid=variablese4_.aj_pi_dbid and processins2_.aj_dbid=145 and variablese4_.aj_mapkey='$BusiPathHasErr$'
这里aj_pi_variables表出现两次,但彼此没有进行连接,查出的结果是错的。
分享到:
相关推荐
NULL 博文链接:https://lijunabc.iteye.com/blog/443381
Hibernate Map 多对多映射
Hibernate常见集合映射(Set,List_Array,Map,Bag)
Hibernate容器映射技术(Set、List、Map)
java map转实体可以利用java的反射去封装,于是就在hibernate的工具类下试着封装了下,封装完了之后感觉没必要,这完全就可以提取出来变成一个独立的工具类,而不仅仅局限于hibernate了,这样既可以满足一个hql查询...
-Hibernate容器-Hibernate容器映射技术(Set、List、Map)(1)映射技术-Hibernate容器映射技术(Set、List、Map)(1)(Set、List、Map)(1)
01 01Hibernate_Handwork : 手工配置使用Hibernate,其中详细标了Hibernate进行持久化的一些过程,因为是Hibernate的入门实例,所以注释很详细,其中有session的关闭后重建问题。 02 02Hibernate_UseMyEclipse: 利用...
Map using Java’s annotations Search and query with the new version of Hibernate Integrate with MongoDB using NoSQL Keep track of versioned data with Hibernate Envers Who This Book Is For ...
在大多数情况下,这样假定应该是没有问题的。 组件的属性可以是任意一种Hibernate类型(包括集合, 多对多关联, 以及其它组件等等)。嵌套组件不应该被当作一种特殊的应用(Nested components should not be ...
8.3. 组件作为Map的索引(Components as Map indices ) 8.4. 组件作为联合标识符(Components as composite identifiers) 8.5. 动态组件 (Dynamic components) 9. 继承映射(Inheritance Mappings) 9.1. 三种...
hibernate集合的映射 集合的映射 set list array map
第一部分 从Hibernate和EJB 3.0开始 第1章 理解对象/关系持久化 1.1 什么是持久化 1.1.1 关系数据库 1.1.2 理解SQL 1.1.3 在Java中使用SQL 1.1.4 面向对象应用程序中的持久化 1.2 范式不...
开始Hibernate之旅 1.2. 第一个可持久化类 1.3. 映射cat 1.4. 与猫同乐 1.5. 结语 2. 体系结构 2.1. 总览 2.2. JMX集成 2.3. JCA支持 3. SessionFactory配置 3.1. 可编程配置方式...
8.3. 组件作为Map的索引(Components as Map indices ) 8.4. 组件作为联合标识符(Components as composite identifiers) 8.5. 动态组件 (Dynamic components) 9. 继承映射(Inheritance Mappings) 9.1. 三种...
8.3. 组件作为Map的索引(Components as Map indices ) 8.4. 组件作为联合标识符(Components as composite identifiers) 8.5. 动态组件 (Dynamic components) 9. 继承映射(Inheritance Mappings) 9.1. 三种...
Hibernate错误1 演示将@MapKey与目标属性映射到@SecondaryTable时在Hibernate中的错误。
在hibernate spring项目基础上通过aixs2-1.4.1把程序发布成webService,包括aixs2以对象数组和AXIOM方式处理map,list的程序代码;和aixs2-1.4-1的jar包
2.4.1 Hibernate的核心接口 2.4.2 事件处理接口 2.4.3 Hibernate映射类型接口 2.4.4 可供扩展的接口 2.5 小结 2.6 思考题 第3章 第一个Hibernate应用 3.1 创建Hibernate的配置文件 3.2 创建持久化类...
Map using Java’s annotations Search and query with the new version of Hibernate Integrate with MongoDB using NoSQL Keep track of versioned data with Hibernate Envers Who This Book Is For Experienced ...
8.3. 组件作为Map的索引(Components as Map indices ) 8.4. 组件作为联合标识符(Components as composite identifiers) 8.5. 动态组件 (Dynamic components) 9. 继承映射(Inheritance Mappings) 9.1. 三种...