jamesfredley opened a new pull request, #15474:
URL: https://github.com/apache/grails-core/pull/15474

   ## Summary
   
   - Add null guards after `getDatastoreForConnection()` calls in 
`DatastoreServiceMethodInvokingFactoryBean.resolveEffectiveDatastore()`, 
throwing a clear `ConfigurationException` with the connection name, domain 
class, and service class rather than silently setting a null datastore.
   - Covers both the explicit `@Transactional(connection=...)` path and the 
domain class mapping inheritance path.
   
   The `MultipleConnectionSourceCapableDatastore` interface doesn't guarantee 
non-null returns, and some implementations (e.g. Neo4j, SimpleMapDatastore) do 
a raw map lookup without validation. Hibernate already throws on missing 
connections, but this makes the factory bean defensive regardless of the 
underlying datastore implementation.
   
   Flagged by Copilot review on #15472.


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