Skip to content

Commit f4cbeca

Browse files
committed
early exit for embedded
1 parent 8ae6474 commit f4cbeca

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

spring-data-jdbc/src/main/java/org/springframework/data/jdbc/repository/query/JdbcDeleteQueryCreator.java

+2-3
Original file line numberDiff line numberDiff line change
@@ -125,12 +125,11 @@ private void deleteRelations(List<Delete> deleteChain, RelationalPersistentEntit
125125

126126
AggregatePath aggregatePath = context.getAggregatePath(path);
127127

128-
// prevent duplication on recursive call
129-
if (path.getLength() > 1 && !aggregatePath.getParentPath().isEmbedded()) {
128+
if (aggregatePath.isEmbedded()){
130129
continue;
131130
}
132131

133-
if (aggregatePath.isEntity() && !aggregatePath.isEmbedded()) {
132+
if (aggregatePath.isEntity() ) {
134133

135134
SqlContext sqlContext = new SqlContext();
136135

0 commit comments

Comments
 (0)