The GitHub Actions job "Code Style" on 
grails-core.git/fix/lookup-by-id-with-tenant-8.0.x has succeeded.
Run started by GitHub user matrei (triggered by matrei).

Head commit for run:
450ff9de9a1aff4878760265c1570f265de169df / Mattias Reichel 
<[email protected]>
Restrict lookups by id through withTenant inside withoutId

Inside Tenants.withoutId, withTenant(tenantId).get(id) and the other
lookups by id through withTenant found an instance of any tenant on GORM
for MongoDB and GORM's in-memory datastore, as getAll did on GORM for
Neo4j, while a query through withTenant(tenantId) there is restricted to
that tenant. Whether a lookup by id goes through a query is now decided
inside the session callback, for the session's datastore, as the
multi-tenant event listener decides it, so the tenant that withTenant
binds for the callback applies.

getAll with an iterable of ids passes them to getAll with an array of
ids again, as on 7.x, so that a subclass that overrides that, such as
GORM for Hibernate's static API, handles both.

The GORM for Neo4j guide now says that lookups by id are restricted to
the current tenant. Upgrade note 88 no longer says that inside withoutId
a lookup by id is not restricted to a tenant on GORM for Neo4j, where
get there finds only the instances of the tenant default, as its queries
do.

Report URL: https://github.com/apache/grails-core/actions/runs/39759115657

With regards,
GitHub Actions via GitBox

Reply via email to