If that can happen, than it is wrong. My understainding is that
because we are in a transaction, before the insert is committed we get
the id of the last record.

On 30 Giu, 11:56, Jose <jjac...@gmail.com> wrote:
> I was checking the file sql.py, seeing the way you get the IDs of the
> different engine databases. I think the problem might occur with the
> use of "SELECT IDENT_CURRENT('tablename'); "in SQLServer, so have the
> other databases.
>
> That is, if that was inserted between the registry and retrieves the
> ID, someone inserts another record, the ID obtained will be incorrect.
> I know that the probability is very small, but it can happen.
>
> For example:
> Postgres use: "select currval ('tablename_id_Seq')"
>
> similarly the other engines.
>
> Jose

Reply via email to