Skip to content

Commit a3be262

Browse files
committed
Update documentation.
Updated the documentation to reflect the changes in Single Query Loading support. See #1448
1 parent b207718 commit a3be262

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/main/antora/modules/ROOT/pages/jdbc/entity-persistence.adoc

+5-3
Original file line numberDiff line numberDiff line change
@@ -28,18 +28,20 @@ If the aggregate root references other entities those are loaded with separate s
2828
With this an arbitrary number of aggregates can be fully loaded with a single SQL query.
2929
This should be significant more efficient, especially for complex aggregates, consisting of many entities.
3030
+
31-
Currently, Single Query Loading is restricted to:
31+
Currently, Single Query Loading is restricted in different ways:
3232

33-
1. It only works for aggregates that only reference one entity collection.The plan is to remove this constraint in the future.
33+
1. The aggregate must not have nested collections, this includes `Map`.The plan is to remove this constraint in the future.
3434

35-
2. The aggregate must also not use `AggregateReference` or embedded entities.The plan is to remove this constraint in the future.
35+
2. The aggregate must not use `AggregateReference` or embedded entities.The plan is to remove this constraint in the future.
3636

3737
3. The database dialect must support it.Of the dialects provided by Spring Data JDBC all but H2 and HSQL support this.H2 and HSQL don't support analytic functions (aka windowing functions).
3838

3939
4. It only works for the find methods in `CrudRepository`, not for derived queries and not for annotated queries.The plan is to remove this constraint in the future.
4040

4141
5. Single Query Loading needs to be enabled in the `JdbcMappingContext`, by calling `setSingleQueryLoadingEnabled(true)`
4242

43+
If any condition is not fulfilled Spring Data JDBC falls back to the default approach of loading aggregates.
44+
4345
NOTE: Single Query Loading is to be considered experimental.
4446
We appreciate feedback on how it works for you.
4547

0 commit comments

Comments
 (0)