apache / apache/grails-core

@CurrentTenant never affects app behavior

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

Description

### Task List

- [x] Steps to reproduce provided
- [x] Stacktrace (if present) provided
- [x] Example that reproduces the problem uploaded to Github
- [x] Full description of the issue provided (see below)

### Steps to Reproduce

1. Setup MT app
2. Apply @WithoutTenant to a method in controller
3. Apply @CurrentTenant to a method in a service

### Expected Behaviour

Service method would execute with current tenant

### Actual Behaviour

Without Tenant behavior in service annotated with CurrentTenant

### Environment Information

- **Operating System**: OSX
- **GORM Version:** 6.1.10
- **Grails Version (if using Grails):** 3.3.6
- **JDK Version:** 8u161

### Example Application

https://github.com/erichelgeson/mttests/blob/master/grails-app/controllers/mttests/CurrentController.groovy#L35

There are other scenarios in this controller as well - I cant find a senario where `@CurrentTenant` would cause the results to differ than just not including the annotation.

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.