Replies: 1 comment 1 reply
-
Maybe if you define a class Author(BaseModel):
authorId: str
name: str
class Article(Model):
...
authors: list[Author]
# query
Article.authors.name == "K. Hemminki" I haven't test it myself, but I hope it works. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
In my FastAPI app, I am trying to query for all author publications by his authorId, but I didn't find any results on how to query nested fields in odmantic. And the documentation doesn't seem to mention anything about it.
Beta Was this translation helpful? Give feedback.
All reactions