diff --git a/docs/python-integration.md b/docs/python-integration.md index 4b92ddcd5..40ae36c8f 100644 --- a/docs/python-integration.md +++ b/docs/python-integration.md @@ -86,7 +86,8 @@ The `vectorizer_relationship` accepts the following parameters: Additional parameters are simply forwarded to the underlying [SQLAlchemy relationship](https://docs.sqlalchemy.org/en/20/orm/relationships.html) so you can configure it as you desire. Think of the `vectorizer_relationship` as a normal SQLAlchemy relationship, but with a preconfigured model instance under the hood. - +The relationship into the other direction is also automatically set, if you want to change it's configuration you can set the +`parent_kwargs`parameter. E.g. `parent_kwargs={"lazy": "joined"}` to configure eager loading. ## Setting up the Vectorizer diff --git a/projects/pgai/tests/vectorizer/extensions/test_sqlalchemy_relationship.py b/projects/pgai/tests/vectorizer/extensions/test_sqlalchemy_relationship.py index 0f87f3ed0..1daa17f4a 100644 --- a/projects/pgai/tests/vectorizer/extensions/test_sqlalchemy_relationship.py +++ b/projects/pgai/tests/vectorizer/extensions/test_sqlalchemy_relationship.py @@ -160,5 +160,5 @@ def test_can_build_select(): to build queries like this would fail. """ select(Document.content_embeddings).options( - joinedload(Document.content_embeddings.parent) + joinedload(Document.content_embeddings.parent) # type: ignore ) # type: ignore