Skip to content

Commit

Permalink
Merge pull request #970 from fredowashere/main
Browse files Browse the repository at this point in the history
fix: example of find by id and link to finding-documents
  • Loading branch information
adeelsohailahmed authored Aug 22, 2024
2 parents 6ebcdf4 + 6386c46 commit bdb6a86
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/tutorial/relations.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ Search by `id` of the linked documents works using the following syntax:

```python
houses = await House.find(
House.door.id == "DOOR_ID_HERE"
House.door.id == PydanticObjectId("DOOR_ID_HERE")
).to_list()
```

Expand Down Expand Up @@ -294,7 +294,7 @@ class Person(Document):

The `original_field` parameter is required for the back link field.

Back links support all the operations that normal links support, but are virtual. This means that when searching the database, you will need to include `fetch_links=True` (see [Finding documents](find.md)), or you will recieve an empty 'BackLink' virtual object. It is not possible to `fetch()` this virtual link after the initial search.
Back links support all the operations that normal links support, but are virtual. This means that when searching the database, you will need to include `fetch_links=True` (see [Finding documents](/tutorial/finding-documents).), or you will recieve an empty 'BackLink' virtual object. It is not possible to `fetch()` this virtual link after the initial search.

## Limitations

Expand Down

0 comments on commit bdb6a86

Please sign in to comment.