You can configure an entire document to send all reads to the slaves by using the
Now all reads involving the
User document will be sent to a slave.
If you want to instruct individual queries to read from a slave you can use the
on the query builder.
The data in the query above will be read from a slave. Even if you have a
@ReferenceMany resulting from the query above it will be initialized and loaded from a slave.
Now when you query and iterate over the accounts, they will be loaded from a slave: