Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
radovanradic committed Feb 27, 2025
1 parent 835f954 commit f242fe1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ interface ParentSuspendRepository : GenericRepository<Parent, Int> {
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<Parent>

suspend fun count(): Long
Expand Down

0 comments on commit f242fe1

Please sign in to comment.