From 194817ee932c65ff080cfb6e4541611bd4288ba3 Mon Sep 17 00:00:00 2001 From: Denis Stepanov Date: Fri, 20 Sep 2024 10:48:04 +0200 Subject: [PATCH] Correct --- .../data/runtime/mapper/sql/SqlResultEntityTypeMapper.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/data-runtime/src/main/java/io/micronaut/data/runtime/mapper/sql/SqlResultEntityTypeMapper.java b/data-runtime/src/main/java/io/micronaut/data/runtime/mapper/sql/SqlResultEntityTypeMapper.java index 9676a91722..4c41ce6768 100644 --- a/data-runtime/src/main/java/io/micronaut/data/runtime/mapper/sql/SqlResultEntityTypeMapper.java +++ b/data-runtime/src/main/java/io/micronaut/data/runtime/mapper/sql/SqlResultEntityTypeMapper.java @@ -275,11 +275,10 @@ public void processRow(RS row) { if (entityId == null) { entityId = id; entityInstance = readEntity(row, ctx, null, null); - } else if (!entityId.equals(id)) { - // We want only one entity, every thing else should be skipped - return; + } else if (entityId.equals(id)) { + // We want only one entity, everything else should be skipped + readChildren(row, entityInstance, null, ctx); } - readChildren(row, entityInstance, null, ctx); } @Override