Revision b64bf874
Von Sebastian Diel vor fast 8 Jahren hinzugefügt
src/querybuilder.cpp | ||
---|---|---|
if ((r.getType() == RelationType::MANY_TO_ONE && props.contains(i.key()))
|
||
|| (r.getType() == RelationType::ONE_TO_ONE && r.getMappedBy().isEmpty())) {
|
||
auto v = props.value(i.key()).read(entity.data());
|
||
QSharedPointer<Entity> e = EntityInstanceFactory::castQVariant(v);
|
||
if (e) {
|
||
this->insertRelationId(e.data(), map, i.key());
|
||
}
|
||
if (v.isValid()) {
|
||
QSharedPointer<Entity> e = EntityInstanceFactory::castQVariant(v);
|
||
if (e) {
|
||
this->insertRelationId(e.data(), map, i.key());
|
||
}
|
||
}
|
||
++i;
|
||
}
|
Auch abrufbar als: Unified diff
Hotfixes a crash with ONE_TO_ONE use (Incident::m_predecessor), not sure
if relation actually works now.