Polishing.

Original pull request #1229
This commit is contained in:
Jens Schauder
2022-06-01 14:48:11 +02:00
parent aa1610d381
commit cf6e174088
3 changed files with 5 additions and 5 deletions

View File

@@ -203,6 +203,7 @@ public class DefaultDataAccessStrategy implements DataAccessStrategy {
.getRequiredPersistentEntity(propertyPath.getBaseProperty().getOwner().getType());
RelationalPersistentProperty referencingProperty = propertyPath.getLeafProperty();
Assert.notNull(referencingProperty, "No property found matching the PropertyPath " + propertyPath);
String delete = sql(rootEntity.getType()).createDeleteInByPath(propertyPath);

View File

@@ -379,6 +379,7 @@ class SqlGenerator {
* @return the statement as a {@link String}. Guaranteed to be not {@literal null}.
*/
String createDeleteInByPath(PersistentPropertyPath<RelationalPersistentProperty> path) {
return createDeleteByPathAndCriteria(new PersistentPropertyPathExtension(mappingContext, path),
filterColumn -> filterColumn.in(getBindMarker(IDS_SQL_PARAMETER)));
}