|
|
|
@ -1963,6 +1963,8 @@ public class MappingMongoConverter extends AbstractMongoConverter implements App |
|
|
|
@SuppressWarnings("unchecked") |
|
|
|
@SuppressWarnings("unchecked") |
|
|
|
public <T> T getPropertyValue(MongoPersistentProperty property) { |
|
|
|
public <T> T getPropertyValue(MongoPersistentProperty property) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ConversionContext propertyContext = context.forProperty(property); |
|
|
|
|
|
|
|
|
|
|
|
if (property.isDbReference() && property.getDBRef().lazy()) { |
|
|
|
if (property.isDbReference() && property.getDBRef().lazy()) { |
|
|
|
|
|
|
|
|
|
|
|
Object rawRefValue = accessor.get(property); |
|
|
|
Object rawRefValue = accessor.get(property); |
|
|
|
@ -1979,9 +1981,16 @@ public class MappingMongoConverter extends AbstractMongoConverter implements App |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (property.isDocumentReference()) { |
|
|
|
if (property.isDocumentReference()) { |
|
|
|
|
|
|
|
|
|
|
|
return (T) dbRefResolver.resolveReference(property, |
|
|
|
return (T) dbRefResolver.resolveReference(property, |
|
|
|
new DocumentReferenceSource(accessor.getDocument(), accessor.get(property)), |
|
|
|
new DocumentReferenceSource(accessor.getDocument(), accessor.get(property)), referenceLookupDelegate, |
|
|
|
referenceLookupDelegate, context::convert); |
|
|
|
context::convert); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (property.isUnwrapped()) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return (T) readUnwrapped(propertyContext, accessor, property, |
|
|
|
|
|
|
|
mappingContext.getRequiredPersistentEntity(property)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return super.getPropertyValue(property); |
|
|
|
return super.getPropertyValue(property); |
|
|
|
|