Skip to content

Multi-tenancy not working with inheritance #14478

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
satshil opened this issue Nov 13, 2016 · 1 comment
Open

Multi-tenancy not working with inheritance #14478

satshil opened this issue Nov 13, 2016 · 1 comment

Comments

@satshil
Copy link

satshil commented Nov 13, 2016

Scenario

Grails 3.1.10
gorm 6.0.0
jdk 1.8

Multitenant application with 3 tenants

  1. default (masterdata)
  2. test-one
  3. test-two

Classes with nature of inheritance

  1. user (abstract base class) (tenant 2,3)
  2. person (child of user) (tenant 2,3)
  3. institute (child of user) (tenant 2,3)
  4. employee (child of person) (tenant 2,3)
  5. superEmployee (child of employee) (tenant 3)

Issues

I found two issues.

  1. I defined datasources mapping properties for the multi-tenant classes. datasources (['test-one','test-two']) defined.
    Expected : Tables created only under test-one and test-two.
    Actual : tables created under dataScource, teat-one and test-two

  2. Child class superEmployee is not defined as multi-tenant. datasource 'test-two' defined.
    Expected : table created only under tenant test-two
    actual : table created under all tenants

Please find test application attached for your reference.

test1.zip

@satshil
Copy link
Author

satshil commented Nov 13, 2016

I think I should have raised this on grails-data-mapping.
Dont know how to transfer?
Should I close this and raise another one on grails-data-mapping?

@puneetbehl puneetbehl self-assigned this Mar 7, 2018
@puneetbehl puneetbehl removed their assignment Jul 10, 2018
@jdaugherty jdaugherty transferred this issue from grails/grails-data-hibernate5 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