new BookshelfMapping()
- Source:
Properties:
Name | Type | Argument | Default | Description |
---|---|---|---|---|
tableName |
string | Fully qualified name of DB Table |
||
identifiedBy |
string |
<optional> |
"id" | Primary key column |
columns |
Array.<(String|ColumnDescriptor)> |
<optional> |
columns to fetch. 'underscore_space' will be converted to 'lowerCamelCase' in Entity |
|
discriminator |
Object | function |
<optional> |
Fetch only Entities which match a given query, Knex where condition |
|
onDelete |
Object |
<optional> |
Execute instead of regular delete statement, Knex update statement |
|
keepHistory |
Boolean |
<optional> |
false | Keep an History History in this table. New states are appended instead of updated. |
historyColumns |
Boolean |
<optional> |
{ revisionId: "revision_id", parentId: "parent_id" } | Configure alias for history columns |
relations |
Array.<RelationDescriptor> |
<optional> |
Managed relations of this Entity. |