You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Due to the way the queries are built (and run), the PK is not correctly set on the UPDATE query resulting in a 'nextval(''transactions_id_seq''::regclass)' in Postgres. The newly created PK is only set on the model after the transaction with the queries has completed. See: https://github.com/postlight/lux/blob/master/src/packages/database/model/index.js#L1243 through line 1246.
@zacharygolba it would be great if you could comment on this. I have been debugging lux for a while now, but haven't fully got an idea of how to fix this without fully overhauling the query builder/runner.
Having two models with a hasOne <-> belongsTo relationship, when creating the model which has the hasOne side two queries are run:
returning 'id'
statement)Due to the way the queries are built (and run), the PK is not correctly set on the UPDATE query resulting in a
'nextval(''transactions_id_seq''::regclass)'
in Postgres. The newly created PK is only set on the model after the transaction with the queries has completed. See: https://github.com/postlight/lux/blob/master/src/packages/database/model/index.js#L1243 through line 1246.@zacharygolba it would be great if you could comment on this. I have been debugging lux for a while now, but haven't fully got an idea of how to fix this without fully overhauling the query builder/runner.
PS. #737 is caused by this too.
The text was updated successfully, but these errors were encountered: