You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a small problem, i use MappingR2dbcConverter to map my entity, but I recently update the version (1.2.15 but i think the problem is always present) and i have a problem with related entity. I think the problem (if the problem is not me) is in this code
private Object readFrom(Row row, @Nullable RowMetadata metadata, RelationalPersistentProperty property,
String prefix) {
String identifier = prefix + property.getColumnName().getReference();
try {
Object value = null;
if (metadata == null || RowMetadataUtils.containsColumn(metadata, identifier)) {
value = row.get(identifier);
}
if (value == null) {
return null;
}
if (getConversions().hasCustomReadTarget(value.getClass(), property.getType())) {
return readValue(value, property.getTypeInformation());
}
if (property.isEntity()) {
return readEntityFrom(row, metadata, property);
}
return readValue(value, property.getTypeInformation());
} catch (Exception o_O) {
throw new MappingException(String.format("Could not read property %s from column %s!", property, identifier),
o_O);
}
}
In case of related entity, the code never go to "readEntityFrom" because "RowMetadataUtils.containsColumn(metadata, identifier)" cannot be true
Work before cause "property.isEntity()" was checked before return null.
Hello,
I have a small problem, i use MappingR2dbcConverter to map my entity, but I recently update the version (1.2.15 but i think the problem is always present) and i have a problem with related entity. I think the problem (if the problem is not me) is in this code
In case of related entity, the code never go to "readEntityFrom" because "RowMetadataUtils.containsColumn(metadata, identifier)" cannot be true
Work before cause "property.isEntity()" was checked before return null.
Example:
The row returned container column: id, client_id and client_name but the function readFrom search an identifier "client" that doest not exist.
Am I missing something ?
The text was updated successfully, but these errors were encountered: