hibernate的update里能不能应用左连接、又连接

hibernate的update里能不能应用左连接、又连接

4个回答

不可以

[url]http://docs.jboss.org/hibernate/core/3.6/reference/zh-CN/html/batch.html#batch-direct[/url]

[quote]不能在大批量 HQL 语句中使用 joins 连接(显式或者隐式的都不行)。不过在 WHERE 子句中可以使用子查询。可以在 where 子句中使用子查询,子查询本身可以包含 join。[/quote]

14.3. Associations and joins

You can also assign aliases to associated entities or to elements of a collection of values using a join. For example:

from Cat as cat
inner join cat.mate as mate
left outer join cat.kittens as kitten
from Cat as cat left join cat.mate.kittens as kittens
from Formula form full join form.parameter param
The supported join types are borrowed from ANSI SQL:

inner join
left outer join
right outer join
full join (not usually useful)
The inner join, left outer join and right outer join constructs may be abbreviated.

from Cat as cat
join cat.mate as mate
left join cat.kittens as kitten
You may supply extra join conditions using the HQL with keyword.

from Cat as cat
left join cat.kittens as kitten
with kitten.bodyWeight > 10.0

不好意思,没看清题目 :(

报什么错,你的hibernate版本是多少

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问