DATAJDBC-546 - Skip property population if entity can be constructed entirely using a full constructor.
This commit is contained in:
@@ -395,7 +395,6 @@ public class BasicJdbcConverter extends BasicRelationalConverter implements Jdbc
|
||||
private T populateProperties(T instance, @Nullable Object idValue) {
|
||||
|
||||
PersistentPropertyAccessor<T> propertyAccessor = getPropertyAccessor(entity, instance);
|
||||
|
||||
PreferredConstructor<T, RelationalPersistentProperty> persistenceConstructor = entity.getPersistenceConstructor();
|
||||
|
||||
for (RelationalPersistentProperty property : entity) {
|
||||
@@ -539,7 +538,8 @@ public class BasicJdbcConverter extends BasicRelationalConverter implements Jdbc
|
||||
RelationalPersistentProperty property = entity.getRequiredPersistentProperty(parameterName);
|
||||
return readOrLoadProperty(idValue, property);
|
||||
});
|
||||
return populateProperties(instance, idValue);
|
||||
|
||||
return entity.requiresPropertyPopulation() ? populateProperties(instance, idValue) : instance;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user