Skip to content

WithoutTenantId not working properly on method level #14407

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
sadasivaiahgoli opened this issue Aug 29, 2018 · 1 comment
Open

WithoutTenantId not working properly on method level #14407

sadasivaiahgoli opened this issue Aug 29, 2018 · 1 comment

Comments

@sadasivaiahgoli
Copy link

sadasivaiahgoli commented Aug 29, 2018

I have Book objects with different tenantIds. But I want to retrive all tenantsId objects from the domain object. But it is not retrieving. It is showing empty list.My method is below.WithoutTenantId not working

For example my book documents are:

id bookName tenant_id
1 abc 2
2 xyz 3

I want to pull both tenant 2 and 3 data.

@WithoutTenant
    List<Book> findAllBooks(){
           List<Book>  bookList=Book.findAll()
            return bookList;
       
            }

MyEnvironment is like this
grailsVersion=3.2.11
gradleWrapperVersion=3.4.1
gormVersion=6.1.10.RELEASE

@puneetbehl puneetbehl self-assigned this May 1, 2019
puneetbehl referenced this issue in apache/grails-data-mapping May 6, 2019
…ntId filter

Updated MultiTenantEventListener to not add multi-tenant filter to the query in case of shared database and when `tenantId` is DEFAULT
puneetbehl referenced this issue in grails/grails-data-mongodb May 6, 2019
puneetbehl referenced this issue in grails/grails-data-mongodb May 6, 2019
Do not add tenantId filter when tenantId is DEFAULT and database is shared.
puneetbehl referenced this issue in grails/grails-data-mongodb May 6, 2019
Update GORM to BUILD-SNAPSHOT as there are some changes in the grails-data-mapping project.
@puneetbehl
Copy link
Contributor

This issue depends on PR apache/grails-data-mapping#1245 and should be fixed with GORM v6.1.10

@jdaugherty jdaugherty transferred this issue from grails/grails-data-mongodb Mar 13, 2025
@jdaugherty jdaugherty transferred this issue from apache/grails-data-mapping Apr 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants