Merge pull request #17 from oatpp/fix_result_mapper

ResultMapper: Fix readOneRowAsMap() method (#16)
This commit is contained in:
Leonid Stryzhevskyi 2022-01-20 02:57:51 +02:00 committed by GitHub
commit e131a87610
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -113,7 +113,7 @@ oatpp::Void ResultMapper::readOneRowAsMap(ResultMapper* _this, ResultData* dbDat
throw std::runtime_error("[oatpp::postgresql::mapping::ResultMapper::readOneRowAsMap()]: Invalid map key. Key should be String");
}
const Type* valueType = map.getValueType();
const Type* valueType = dispatcher->getValueType();
for(v_int32 i = 0; i < dbData->colCount; i ++) {
mapping::Deserializer::InData inData(dbData->dbResult, rowIndex, i, dbData->typeResolver);
dispatcher->addItem(map, dbData->colNames[i], _this->m_deserializer.deserialize(inData, valueType));