MappedSuperClass Association to sec$Group generates IllegalStateException

Hello guys!

I’m following the Multitenancy Paradigm and I’d like to show the Access Group name along with the Access Group tenantID Session Attribute.

This is important for top Tenants managing all data, because the tenantID number alone, is not very informative.

I tried to put an Association to sec$Group in the MappedSuperClass so it’s inherited by all Children Entity, but I get:

IllegalStateException: Cannot get unfetched attribute [group] from detached object

On the other hand, if I put such an Association in a Standard Entity (see Product in the sample project) everything works fine.

Am I missing Something? Is there another way for top Tenants to know whose Group is an Entity Instance, besides checking the tenantID number?

Than you very much for your support!

Lucio

multi-tenancy.zip (338.6K)

Hi Lucio,

Thank you for the clear explanation and test project.

The solution is quite easy: just set your order-view view for the datasource of the order-edit.xml screen. Perhaps you have missed it when created the screen.

It worked, thank you Konstantin!

Yes I forgot to put the order-view in the datasource, maybe a wrong copy-paste… I rely too much on the fact that usually the correct view is provided by CUBA

Thanks