jamesfredley commented on issue #11798:
URL: https://github.com/apache/grails-core/issues/11798#issuecomment-3936343894

   Hi - we've identified the root cause and have a fix in PR #15425.
   
   **Root cause:** `GrailsOpenSessionInViewInterceptor` only opened a Hibernate 
session for the *default* datasource's `SessionFactory`. When a domain class 
mapped to a non-default datasource was used as a command object, `validate()` 
needed a session for that datasource's `SessionFactory`, but OSIV never opened 
one - causing validation to fail.
   
   **Fix:** The OSIV interceptor now iterates all configured connection sources 
and opens/binds sessions for each non-default datasource alongside the default 
one during web requests.
   
   This shares the same root cause as issue #14333 (`withSession` on secondary 
datasource throwing `No Session found for current thread`), so both are 
addressed by the same fix.


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