-
Notifications
You must be signed in to change notification settings - Fork 641
Open
Labels
Description
QueryBuilder has a convenient method tableRef
which returns the alias for the model the query builder operates against:
objection.js/lib/queryBuilder/QueryBuilder.js
Lines 87 to 89 in 1b74f75
tableRef() { | |
return this.tableRefFor(this.modelClass().getTableName()); | |
} |
However it's not exposed in typings and not mentioned in the documentation. Can we add it?
On a side note, its implementation clearly contradicts the typings for tableRefFor
:
objection.js/typings/objection/index.d.ts
Lines 615 to 617 in 1b74f75
interface TableRefForMethod { | |
(modelClass: typeof Model): string; | |
} |
the method is supposed to accept a model class, but the actual implementation passes a string.