Copilot commented on code in PR #16299:
URL: https://github.com/apache/grails-core/pull/16299#discussion_r3919215886


##########
grails-doc/src/en/guide/gettingStarted/developmentReloading.adoc:
##########
@@ -25,6 +25,8 @@ Spring Boot Developer Tools is a feature of Spring Boot that 
provides automatic
 
 For larger applications, you may need to adjust the default settings for 
optimal performance.  This works well until your application becomes very 
large, at which point restarts may take longer or fail.
 
+When Spring Boot Developer Tools is on the classpath, Grails bootstraps 
Hibernate with DevTools' restart class loader. That keeps domain class identity 
consistent with Hibernate's metamodel without moving GORM or Grails jars onto 
the restart loader. Without that alignment, GORM calls such as `Role.count()` 
and `save()` can fail with `IllegalArgumentException: Not an entity` while 
`get()` and HQL still work.

Review Comment:
   This wording is too absolute: having DevTools on the classpath does not 
always mean a `RestartClassLoader` is actually active (e.g. restart can be 
disabled). The implementation only prefers the restart loader when the thread 
context class loader is a `RestartClassLoader`, so the docs should reflect that 
to avoid misleading users.



-- 
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