Skip to content

Add Example for Multi Tenancy using Parent-Child relationship #676

@bashayam30

Description

@bashayam30

I am trying to implement multi tenancy by following the post - https://spring.io/blog/2022/07/31/how-to-integrate-hibernates-multitenant-feature-with-spring-data-jpa-in-a-spring-boot-application

But while using parent child relationship with @onetomany relation and LAZY fetch, tenantId filter is not applied by hibernate to the SQL JOIN queries to fetch the child records.

Need an example on how to apply tenantId filter for Partitioned Data approach.

Thanks in advance!

Metadata

Metadata

Assignees

No one assigned

    Labels

    for: external-projectFor an external project and not something we can fix

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions