How do I enforce lazy loading in a OneToOne relationship? #5489
Unanswered
jeongsik-woo
asked this question in
Q&A
Replies: 1 comment 6 replies
-
Lazy loading is the default. Why do you think the docs show an example of eager loading? It is not. |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
How do I enforce lazy loading in a OneToOne relationship?
The documentation at https://mikro-orm.io/docs/next/relationships#onetoone only gives examples of eager loading, but I want to implement lazy loading.
For example, User owns a Book and you want to lazy load user from the Book entity.
Like this
await book.user.load();
Is this possible?
Can you give me an example?
Beta Was this translation helpful? Give feedback.
All reactions