You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/main/antora/modules/ROOT/pages/repositories/projections.adoc
+1-1
Original file line number
Diff line number
Diff line change
@@ -68,7 +68,7 @@ This query gets rewritten to `SELECT new UserDto(u.firstname, u.lastname) FROM U
68
68
69
69
[WARNING]
70
70
====
71
-
JPQL constructor expressions must not contain aliases for selected columns.
71
+
JPQL constructor expressions must not contain aliases for selected columns and query rewriting will not remove them for you.
72
72
While `SELECT u as user, count(u.roles) as roleCount FROM USER u …` is a valid query for interface-based projections that rely on column names from the returned `Tuple`, the same construct is invalid when requesting a DTO where it needs to be `SELECT u, count(u.roles) FROM USER u …`. +
73
73
Some persistence providers may be lenient about this, others not.
0 commit comments