首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > J2SE开发 >

hibernate 会实现同时更新与查询吗

2014-01-08 
hibernate 能实现同时更新与查询吗hibernate 能实现同时更新与查询吗 即写一个hql语句 update采用子查询wh

hibernate 能实现同时更新与查询吗
hibernate 能实现同时更新与查询吗 即写一个hql语句 update采用子查询  where条件的结果 是另外一张表查询出来的  例如 update table1 where table1.a=(select table2 from table2 where table2.b='a')
这样可以吗
[解决办法]
可以的,一般都是用子查询查出id
a.id=(select table2.id from table2 where table2.b='a')
这么用

热点排行