|
26 | 26 |
|
27 | 27 | import org.apache.commons.logging.Log;
|
28 | 28 | import org.apache.commons.logging.LogFactory;
|
| 29 | + |
29 | 30 | import org.springframework.context.ApplicationContextAware;
|
30 | 31 | import org.springframework.core.convert.ConverterNotFoundException;
|
31 | 32 | import org.springframework.core.convert.converter.Converter;
|
|
45 | 46 | import org.springframework.data.relational.core.mapping.RelationalMappingContext;
|
46 | 47 | import org.springframework.data.relational.core.mapping.RelationalPersistentEntity;
|
47 | 48 | import org.springframework.data.relational.core.mapping.RelationalPersistentProperty;
|
48 |
| -import org.springframework.data.relational.core.sql.SqlIdentifier; |
49 | 49 | import org.springframework.data.relational.domain.RowDocument;
|
50 | 50 | import org.springframework.data.util.TypeInformation;
|
51 | 51 | import org.springframework.lang.Nullable;
|
@@ -384,15 +384,14 @@ public <T> T getPropertyValue(RelationalPersistentProperty property) {
|
384 | 384 | // references and possibly keys, that form an id
|
385 | 385 | if (idDefiningParentPath.hasIdProperty()) {
|
386 | 386 |
|
387 |
| - Class<?> idType = idDefiningParentPath.getRequiredIdProperty().getActualType(); |
388 |
| - // |
389 |
| - RelationalPersistentProperty requiredIdProperty = idDefiningParentPath.getRequiredIdProperty(); |
390 |
| - AggregatePath idPath = idDefiningParentPath.append(requiredIdProperty); |
391 |
| - Object idValue = delegate.getValue(idPath); |
| 387 | + RelationalPersistentProperty identifier = idDefiningParentPath.getRequiredIdProperty(); |
| 388 | + AggregatePath idPath = idDefiningParentPath.append(identifier); |
| 389 | + Object value = delegate.getValue(idPath); |
392 | 390 |
|
393 |
| - Assert.state(idValue != null, "idValue must not be null at this point"); |
| 391 | + Assert.state(value != null, "Identifier value must not be null at this point"); |
394 | 392 |
|
395 |
| - identifierToUse = Identifier.of(aggregatePath.getTableInfo().reverseColumnInfo().name(), idValue, idType); |
| 393 | + identifierToUse = Identifier.of(aggregatePath.getTableInfo().reverseColumnInfo().name(), value, |
| 394 | + identifier.getActualType()); |
396 | 395 | }
|
397 | 396 |
|
398 | 397 | Iterable<Object> allByPath = relationResolver.findAllByPath(identifierToUse,
|
|
0 commit comments