Skip to content

Commit fcfe5fa

Browse files
authored
Add entityField info on indexes
1 parent 2de1a1c commit fcfe5fa

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ const MyTable = new Table({
250250
| alias | `string` | no | An optional alias to reference your table when using "batch" features |
251251
| partitionKey | `string` | yes | The attribute name of your table's partitionKey |
252252
| sortKey | `string` | no | The attribute name of your table's sortKey |
253-
| entityField | `boolean` or `string` | no | Disables or overrides entity tracking field name (default: `_tp`) |
253+
| entityField | `boolean` or `string` | no | Disables or overrides entity tracking field name (default: `_et`) |
254254
| attributes | `object` | no | Complex type that optionally specifies the name and type of each attributes (see below) |
255255
| indexes | `object` | no | Complex type that optionally specifies the name keys of your secondary indexes (see below) |
256256
| autoExecute | `boolean` | no | Enables automatic execution of the DocumentClient method (default: `true`) |
@@ -290,7 +290,7 @@ indexes: {
290290
}
291291
```
292292

293-
**NOTE:** The **index name** must match the index name on your table as it will be used in queries and other operations.
293+
**NOTE:** The **index name** must match the index name on your table as it will be used in queries and other operations. The index must include the table's `entityField` attribute for automatic parsing of returned data.
294294

295295
## Entities
296296

@@ -503,7 +503,7 @@ The second argument is an `options` object that specifies the details of your qu
503503

504504
| Option | Type | Description |
505505
| -------- | :--: | ----------- |
506-
| index | `string` | Name of secondary index to query. If not specified, the query executes on the primary index. (IndexName) |
506+
| index | `string` | Name of secondary index to query. If not specified, the query executes on the primary index. The index must include the table's `entityField` attribute for automatic parsing of returned data. (IndexName) |
507507
| limit | `number` | The maximum number of items to retrieve per query. (Limit) |
508508
| reverse | `boolean` | Reverse the order or returned items. (ScanIndexForward) |
509509
| consistent | `boolean` | Enable a consistent read of the items (ConsistentRead) |

0 commit comments

Comments
 (0)