You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@grails.apache.org by GitBox <gi...@apache.org> on 2026/02/24 04:16:12 UTC
[GH] (grails-core/feat/data-service-datasource-inheritance): Workflow run "CodeQL" is working again!
The GitHub Actions job "CodeQL" on grails-core.git/feat/data-service-datasource-inheritance has succeeded.
Run started by GitHub user jamesfredley (triggered by jamesfredley).
Head commit for run:
19205e665791d6ba924e085973b92ca98979c140 / James Fredley <ja...@users.noreply.github.com>
fix: generate connection-aware getTransactionManager() in ServiceTransformation for inherited datasource services
When a @Service data service auto-inherits its datasource from the domain class mapping,
ServiceTransformation creates a synthetic impl class and adds @Transactional(connection='secondary')
to it. However, TransactionalTransform runs in SEMANTIC_ANALYSIS phase before the impl class
exists, so it never weaves getTransactionManager() with the correct connection-aware logic onto
that impl. At runtime this caused 'No Session found for current thread' because the default
transaction manager was used instead of the secondary one.
Fix: ServiceTransformation now directly generates the getTransactionManager() method on the
impl class in applyDomainConnectionToService(), mirroring exactly what TransactionalTransform
would have done for Service-implementing classes with a connection attribute.
Assisted-by: Claude Code <Cl...@Claude.ai>
Report URL: https://github.com/apache/grails-core/actions/runs/22336053443
With regards,
GitHub Actions via GitBox