udegel
(Uwe)
March 14, 2020, 11:45am
#1
Hi All,
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
mario
(Mario David)
March 14, 2020, 3:01pm
#2
Hi uwe,
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
Cheers
Mario
udegel
(Uwe)
March 14, 2020, 5:41pm
#3
Hi Mario,
please find the project folder here: https://app.box.com/s/rtsujm3mecbx1b3ksvaqfizq6gf48q9f
Cheers, Uwe
mario
(Mario David)
March 15, 2020, 8:53pm
#4
Hi,
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.
Cheers
Mario
udegel
(Uwe)
March 16, 2020, 4:39pm
#5
Hi Mario,
many thanks for your great support. Intgerated in my application and works!
BR, Uwe
1 Like