您好, 欢迎来到 !    登录 | 注册 | | 设为首页 | 收藏本站

这是否可能:结果中包含list属性的JPA / Hibernate查询?

这是否可能:结果中包含list属性的JPA / Hibernate查询?

没有NEW(选择标量值 集合值的路径表达式)的查询无效,因此我认为添加a NEW不会使事情起作用。

作为记录,这是JPA 2.0规范在 所说的:

SELECT子句具有以下语法:

select_clause ::= SELECT [DISTINCT] select_item {, select_item}*
select_item ::= select_expression [ [AS] result_variable]
select_expression ::=
         single_valued_path_expression |
         scalar_expression |
         aggregate_expression |
         identification_variable |
         OBJECT(identification_variable) |
         constructor_expression
constructor_expression ::=
         NEW constructor_name ( constructor_item {, constructor_item}* )
constructor_item ::=
         single_valued_path_expression |
         scalar_expression |
         aggregate_expression |
         identification_variable
aggregate_expression ::=
         { AVG | MAX | MIN | SUM } ([DISTINCT]

state_field_path_expression) | COUNT ([DISTINCT] identification_variable | state_field_path_expression | single_valued_object_path_expression)

其他 2022/1/1 18:14:21 有719人围观

撰写回答


你尚未登录,登录后可以

和开发者交流问题的细节

关注并接收问题和回答的更新提醒

参与内容的编辑和改进,让解决方法与时俱进

请先登录

推荐问题


联系我
置顶