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
If a field in a model is set to id: true using the @property decorator, then under normal behaviour, during service startup / migration, the respective MySQL database column should be set as primary key.
The bug consists of this setting of the primary key not happening.
For example, if the foo.databaseModel.ts file contains the following:
then column foo_id is expected to be set as a private key. The bug consists if it remaining unset.
It's important to note, that if foo_id is already set as a primary key, it remains one after the startup / migration. This means that the startup / migration do not unset the primary key property of the column in the database.
Describe the bug
If a field in a model is set to
id: true
using the@property
decorator, then under normal behaviour, during service startup / migration, the respective MySQL database column should be set as primary key.The bug consists of this setting of the primary key not happening.
For example, if the
foo.databaseModel.ts
file contains the following:then column
foo_id
is expected to be set as a private key. The bug consists if it remaining unset.It's important to note, that if
foo_id
is already set as a primary key, it remains one after the startup / migration. This means that the startup / migration do not unset the primary key property of the column in the database.Expected MySQL query output
Actual MySQL query output
Reproduction
Forked repo reproduction not practical due to need to spin up a database.
The text was updated successfully, but these errors were encountered: