Skip to content

Commit

Permalink
minor clarifications to HQL chapter
Browse files Browse the repository at this point in the history
  • Loading branch information
gavinking committed Jun 17, 2022
1 parent 941db3c commit c163e1f
Showing 1 changed file with 4 additions and 1 deletion.
Expand Up @@ -1612,7 +1612,7 @@ Indeed, it's best to avoid even assigning an identification variable to a fetche
[IMPORTANT]
====
Fetch joins should not be used in limited or paged queries.
Fetch joins should usually be avoided in limited or paged queries.
This includes:

- queries executed using `setFirstResult()` or `setMaxResults()`, as in <<jpql-pagination>>, or
Expand Down Expand Up @@ -1792,6 +1792,9 @@ NOTE: This operation is called _projection_.
Any of the expression types discussed in <<hql-expressions>> may occur in the projection list, unless otherwise noted.
TIP: If a query has no explicit `select` list, the projection is inferred from the entities and joins occurring in the `from` clause, together with the result type specified by the call to `createQuery()`.
It's better to specify the projection explicitly, except in the simplest cases.
There might be multiple items in a projection list, in which case each query result is a tuple, and this poses a problem:
Java doesn't have a good way to represent tuples.
Expand Down

0 comments on commit c163e1f

Please sign in to comment.