Skip to content

Add mentioning of EntityManager to the documentation #60

@alexbudarov

Description

@alexbudarov

Description of the bug or enhancement

https://www.cuba-platform.com/discuss/t/multitenancy-plugin-not-filtering-on-tenants-through-entitymanager/10825/3?u=alexbudarov

Newbie users don't realize that multitenancy constraints are applied.

The documentation doesn't say anything about the way you should load data in order for tenant constraints to be applied.

It should be a separate section.
Things we would like to see in the doc:

  • Adding multitenancy constraints work on the EntityManager layer for JPQL queries. Multitenancy constraints don't work for native SQL queries.
  • If you need auto-applying of tenant constraints, you need to load data with EntityManager/DataManager
  • All data loaders use DataManager to load their data
  • REST API also uses DataManager to load data
  • Reporting: SQL bands don't apply multitenancy constraints. Those can be applied only if you call DataManager queries inside of a Groovy band or use JPQL bands
  • Reporting: JPQL bands work with multitenancy constraints.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions