I updated my project to the latest ABP Version and now nothing is working....
Can not set TenantId to a different value from the current filter parameter value while MayHaveTenant filter is enabled!
How do i remove this filter from ALL the application...?
ISSUE RELATED : <a class="postlink" href="https://github.com/aspnetboilerplate/aspnetboilerplate/issues/476">https://github.com/aspnetboilerplate/as ... issues/476</a>
Doc: <a class="postlink" href="http://aspnetboilerplate.com/Pages/Documents/Data-Filters">http://aspnetboilerplate.com/Pages/Docu ... ta-Filters</a>
The documentation doesn't tell us how to remove forever the IMayHaveTenant filter.... that is pretty useless for almost everyone that doesn't require Tenant part of the framework...
Please do more documentation on Breaking Change release...
3 Answer(s)
-
0
Hi,
Are you using module-zero? If yes, UserManager and RoleManager can not work without IMayHaveTenant filter, because it's the column which it used to filter different tenant data..
If there is a problem for only one point, you can disable the filter.
Also, do you use multi-tenancy?
Beside that, if you really want, you can disable it completely like that: <a class="postlink" href="https://github.com/aspnetboilerplate/aspnetboilerplate/issues/487#issuecomment-102796983">https://github.com/aspnetboilerplate/as ... -102796983</a>
-
0
BTW,
I did not think this as breaking change since our application should not insert an entity with TenantId = 5 while Current TenantId = null. They should be same. Because, if not it can not read the saved entity (because of IMayHaveTenant filter). I now defined all AbpDbContext members are protected virtual, so you can override any method to disable it: <a class="postlink" href="https://github.com/aspnetboilerplate/aspnetboilerplate/commit/3da5a7d08420b3d92a9462c842477e9fc99827fd">https://github.com/aspnetboilerplate/as ... 9fc99827fd</a>
-
0
Yea i use Module-Zero and never had this problem till today where i updated from low version to latest!
I never used the Multi-Tenancy part. Mostly because i'm not even sure to understand what's it is for? Multi-Compagny on 1 web-site?
So i put the Config in the pre-ini and in my seeder i put the context.DisableAllFilter() for the seeding part. I will test it tomorrow!
i did too many modification to try to make it back running.
And to answer, i'm trying to put my default Admin in my seed and there was nothing that was working because it was telling me the error!