Last active
February 6, 2022 18:29
-
-
Save B4nan/aeac8b5ebd93c8042007b658c2ec349d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // querying for author will trigger auto-flush if we have new author persisted | |
| const a1 = new Author(...); | |
| em.persist(a1); | |
| const r1 = await em.find(Author, {}); | |
| // querying author won't trigger auto-flush if we have new book, but no changes on author | |
| const b4 = new Book(...); | |
| em.persist(b4); | |
| const r2 = await em.find(Author, {}); | |
| // but querying for book will trigger auto-flush | |
| const r3 = await em.find(Book, {}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment