apache / apache/grails-core

WithoutTenantId not working properly on method level

Open
#14,407 1 comment 0 reactions 1 assignee Claimed by @puneetbehl View on GitHub
relates-to: grails-data-mongodb
Dominant language
Groovy
Stars
2.9k
Forks
975
Avg merge
1d 22h
Merged PRs (30d)
92

Description

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 findAllBooks(){
List bookList=Book.findAll()
return bookList;

}
```

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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.