ruthst00 commented on code in PR #16573:
URL: https://github.com/apache/grails-core/pull/16573#discussion_r4340123083


##########
grails-doc/src/en/ref/Domain Classes/createCriteria.adoc:
##########
@@ -73,6 +73,26 @@ println "Rendering ${results.size()} Accounts of 
${results.totalCount}"
 The `sort` and `order` arguments accepted alongside the pagination values are 
checked the same way as for link:list.html[list()]: `sort` must be a property 
path made up of identifiers separated by dots that resolves through the domain 
class mapping, and `order` must be `"asc"` or `"desc"` (case-insensitive, 
surrounding whitespace ignored). Any other value is rejected with an 
`IllegalArgumentException` before the query is built, so request parameters can 
be passed through without further checks. A dotted `sort` key whose first 
segment is an alias created with `createAlias` is left for the query to 
resolve; a bare name must be a property of the domain class.
 
 
+=== Association aliases
+
+With Hibernate, `createAlias('association', 'alias')` creates an inner join. 
Restrictions, projections, and ordering on `alias.property` reuse that 
association join rather than adding another join.
+
+For Hibernate 7, the three-argument overload accepts `0` for an inner join, 
`1` for a left outer join, or `2` for a right outer join. For example, to 
include books with no author as well as books whose author has a name:

Review Comment:
   Fixed in 
https://github.com/apache/grails-core/pull/16573/changes/69b2726dae41b3d6f514c9c59f4ad349d8532907



##########
grails-data-hibernate7/core/src/main/groovy/org/grails/orm/hibernate/query/QueryAliasRegistrar.java:
##########
@@ -0,0 +1,131 @@
+/*
+ * Copyright 2024-2025 the original author or authors.

Review Comment:
   Fixed in 
https://github.com/apache/grails-core/pull/16573/changes/69b2726dae41b3d6f514c9c59f4ad349d8532907



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to