diff --git a/doc-examples/jdbc-example-java/src/test/java/example/StaticMetamodelTest.java b/doc-examples/jdbc-example-java/src/test/java/example/StaticMetamodelTest.java index 58e011233ef..6cb3f20df41 100644 --- a/doc-examples/jdbc-example-java/src/test/java/example/StaticMetamodelTest.java +++ b/doc-examples/jdbc-example-java/src/test/java/example/StaticMetamodelTest.java @@ -59,7 +59,7 @@ void testMetamodel() { String q = criteriaQuery.buildQuery(AnnotationMetadata.EMPTY_METADATA, new SqlQueryBuilder2()).getQuery(); Assertions.assertEquals(""" - SELECT client_."id",client_."name",client_."main_category_id",client_categories_collection_."id" AS categories_collection_id,client_categories_collection_."name" AS categories_collection_name FROM "client" client_ LEFT JOIN "client_category" client_categories_collection_client_category_ ON client_."id"=client_categories_collection_client_category_."client_id" LEFT JOIN "category" client_categories_collection_ ON client_categories_collection_client_category_."category_id"=client_categories_collection_."id\"""", + SELECT client_."id",client_."name",client_categories_collection_."id" AS categories_collection_id,client_categories_collection_."name" AS categories_collection_name FROM "client" client_ LEFT JOIN "client_category" client_categories_collection_client_category_ ON client_."id"=client_categories_collection_client_category_."client_id" LEFT JOIN "category" client_categories_collection_ ON client_categories_collection_client_category_."category_id"=client_categories_collection_."id\"""", q); } } diff --git a/doc-examples/r2dbc-example-kotlin/src/main/kotlin/example/ParentSuspendRepository.kt b/doc-examples/r2dbc-example-kotlin/src/main/kotlin/example/ParentSuspendRepository.kt index 89f70fc7ab5..8fe5afe9b0c 100644 --- a/doc-examples/r2dbc-example-kotlin/src/main/kotlin/example/ParentSuspendRepository.kt +++ b/doc-examples/r2dbc-example-kotlin/src/main/kotlin/example/ParentSuspendRepository.kt @@ -19,6 +19,7 @@ interface ParentSuspendRepository : GenericRepository { suspend fun update(@NonNull entity: Parent): Parent @Transactional(Transactional.TxType.MANDATORY) + @Join(value = "children", type = Join.Type.LEFT_FETCH) suspend fun queryById(id: Int): Optional suspend fun count(): Long