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
This causes an issue in my code on version 3.1.4. Doing either:
static idColumn = null;
or
static get idColumn() {
return null;
}
Results in a compiler error:
Types of property 'idColumn' are incompatible.
Type 'null' is not assignable to type 'string | string[]```
Only by casting like `static idColumn = null as unknown as string;` can I work around the issue. Not setting idColumn causes runtime errors.
The text was updated successfully, but these errors were encountered:
According to documentation, idColumn should be set to null in the event a table does not have an id column: https://vincit.github.io/objection.js/api/model/static-properties.html#static-idcolumn
But due to the typings, null is not a possible valid value for
idColumn
- onlystring | string[]
:objection.js/typings/objection/index.d.ts
Line 1541 in d1e194a
This causes an issue in my code on version 3.1.4. Doing either:
or
Results in a compiler error:
The text was updated successfully, but these errors were encountered: