when using master-detail screens, I get an access denied error
and when I press second time OK, the record is written to the database, without filling the tenant_id column.
To reproduce the bug, I used your example project from GITHUB and added the screen “store-browse2”
messages.properties (41 Bytes) StoreBrowse2.java (336 Bytes) store-browse2.xml (3.5 KB)
Hier the log:
app-part.txt (23.6 KB)
Would be great to get some help on this as I really would need to get multi-tenancy up and running
Can you share a complete sample project? Normally this helps the people to much faster work on the investigation and with that increases your chances of getting help fast
please find the project folder here: https://app.box.com/s/rtsujm3mecbx1b3ksvaqfizq6gf48q9f
I think the problem you are facing is due to the bug in the 2.0.0.BETA1 of the addon.
The problem is described here: Multitenancy not working? - #4 от пользователя h.hamstra - CUBA.Platform
The issue is described here: TenantId is not set for new entities · Issue #39 · cuba-platform/multitenancy-addon · GitHub
Attached I changed the project and added the mentioned MultitenacyEntityPersistingListener class in the core module. Now everything seems to work:
singledb-multitenancy.zip (299.2 KB)
In the 2.0 release, this problem should already be resolved.
many thanks for your great support. Intgerated in my application and works!