Skip to content

Commit 5175ff4

Browse files
committed
removed another fullPath usage
1 parent 9ede13b commit 5175ff4

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

spring-data-jdbc/src/main/java/org/springframework/data/jdbc/core/convert/SqlParametersFactory.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@ <T> SqlIdentifierParameterSource forInsert(T instance, Class<T> domainType, Iden
8888
AggregatePath.ColumnInfos columnInfos = context.getAggregatePath(persistentEntity).getTableInfo().idColumnInfos();
8989

9090
// fullPath: because we use the result with a PropertyPathAccessor
91-
columnInfos.forEach((ap, __) -> {
92-
Object idValue = propertyPathAccessor.getProperty(columnInfos.fullPath(ap).getRequiredPersistentPropertyPath());
91+
columnInfos.forEachLong((ap, __) -> {
92+
Object idValue = propertyPathAccessor.getProperty(ap.getRequiredPersistentPropertyPath());
9393
RelationalPersistentProperty idProperty = ap.getRequiredLeafProperty();
9494
addConvertedPropertyValue(parameterSource, idProperty, idValue, idProperty.getColumnName());
9595
});

spring-data-relational/src/main/java/org/springframework/data/relational/core/mapping/AggregatePath.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -610,6 +610,15 @@ public void forEach(BiConsumer<AggregatePath, ColumnInfo> consumer) {
610610
columnInfos.forEach(consumer);
611611
}
612612

613+
/**
614+
* Calls the consumer for each pair of {@link AggregatePath} and {@literal ColumnInfo}.
615+
*
616+
* @param consumer the function to call.
617+
*/
618+
public void forEachLong(BiConsumer<AggregatePath, ColumnInfo> consumer) {
619+
longColumnInfos.forEach(consumer);
620+
}
621+
613622
/**
614623
* Calls the {@literal mapper} for each pair one pair of {@link AggregatePath} and {@link ColumnInfo}, if there is
615624
* any.

0 commit comments

Comments
 (0)