dyna-record 0.0.13 → 0.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -328,7 +328,7 @@ If no record is found matching the provided ID, findById returns undefined. This
|
|
|
328
328
|
##### Find an entity by id
|
|
329
329
|
|
|
330
330
|
```typescript
|
|
331
|
-
const course
|
|
331
|
+
const course = await Course.findById("123");
|
|
332
332
|
|
|
333
333
|
// user.id; - ok for any attribute
|
|
334
334
|
// user.teacher; - Error! teacher relationship was not included in query
|
|
@@ -338,7 +338,7 @@ const course: Course = await Course.findById("123");
|
|
|
338
338
|
#### Including related entities
|
|
339
339
|
|
|
340
340
|
```typescript
|
|
341
|
-
const course
|
|
341
|
+
const course = await Course.findById("123", {
|
|
342
342
|
include: [{ association: "teacher" }, { association: "assignments" }]
|
|
343
343
|
});
|
|
344
344
|
|