Base solution for your next web application
Open Closed

Bug in Tenant ID ? #3927


User avatar
0
chehrhard created

Hi

I use Core & Angular Zero

I unterstand that the default tenant Id should be 1. But if the first seedings fails, the Id will be 2, 3 or more.

To reproduce, try to add a Custom Builder and make it fail (on a newly created DB)

Is this a bug or am i false ?


2 Answer(s)
  • User Avatar
    0
    aaron created
    Support Team

    It's not a bug (and you are not false).

    This happens because once the application creates tenant and saves changes (to get tenant id), the id is reserved in database. When it later fails and rolls back, the id is no longer available. Subsequent seedings thus use subsequent integers, provided by the database (correctly).

  • User Avatar
    0
    chehrhard created

    ok, i unterstoud this. However, i spent a couple of hour to find this problem so, if this post can prevent others from wasting their time, I would be glad :) :)