RamyHakam / multi-tenancy-project-example

This is a simple example of using the https://github.com/RamyHakam/multi_tenancy_bundle
4 stars 3 forks source link

Error while creating a new tenant by calling create-tenant route: class "TenantUser" not found in "App\Entity\Tenant" #3

Closed fouadSalkini closed 1 year ago

fouadSalkini commented 1 year ago

The class 'App\Entity\Main\TenantUser' was not found in the chain configured namespaces App\Entity\Tenant

also got the same error while using the tenancy bundle in my standalone app

it seems that doctrine is using the tenant db config instead of the main db config while creating a new tenant.

@RamyHakam any solution ?

RamyHakam commented 1 year ago

Hey @fouadSalkini

Thanks for raising this issues

The attached PR fixes that issue This issue explains You should set the default connection and entity manager in your doctrine config