Revision bb0340b7
Von Christian Ehringfeld vor etwa 9 Jahren hinzugefügt
.travis.yml | ||
---|---|---|
&& sudo apt-get -qq install gcc-5 libc6-i386 qt54tools qt54svg qt54webkit
|
||
&& export CXX="g++-5"
|
||
&& export CC="gcc-5"
|
||
&& export QMAKE=/usr/lib/x86_64-linux-gnu/qt5/bin/qmake
|
||
;
|
||
else
|
||
brew update
|
||
... | ... | |
fi
|
||
|
||
script:
|
||
- qmake
|
||
- QMAKE
|
||
&& make -j 3
|
||
&& make check
|
src/entitymanager.cpp | ||
---|---|---|
void EntityManager::savePostPersistedRelations(const QSharedPointer<Entity>
|
||
&entity, QList<Entity *> &mergedObjects, bool ignoreHasChanged) {
|
||
auto relations = EntityHelper::getRelationProperties(entity.data());
|
||
auto iterator = relations.constBegin();
|
||
while (iterator != relations.constEnd()) {
|
||
for (auto iterator = relations.constBegin(); iterator != relations.constEnd();
|
||
++iterator) {
|
||
const Relation r = iterator.key();
|
||
auto var = iterator.value().read(entity.data());
|
||
if (!var.isNull()) {
|
||
... | ... | |
for (int var = 0; var < list.size(); ++var) {
|
||
auto e = list.at(var);
|
||
if (this->shouldBeSaved(e, r)) {
|
||
this->saveObject(e, mergedObjects, true, ignoreHasChanged);
|
||
if (fkProp.isValid()) {
|
||
EntityHelper::addEntityToListProperty(e, entity, fkProp);
|
||
EntityHelper::setProperty(e, entity, fkProp);
|
||
}
|
||
this->saveObject(e, mergedObjects, true, ignoreHasChanged);
|
||
}
|
||
}
|
||
}
|
||
} else if (r.getType() == RelationType::ONE_TO_ONE
|
||
&& !r.getMappedBy().isEmpty()) {
|
||
auto e = EntityInstanceFactory::castQVariant(var);
|
||
this->saveObject(e, mergedObjects, true, ignoreHasChanged);
|
||
auto fkProp = EntityHelper::mappedProperty(r, e);
|
||
if (fkProp.isValid()) {
|
||
EntityHelper::addEntityToListProperty(e, entity, fkProp);
|
||
EntityHelper::setProperty(e, entity, fkProp);
|
||
}
|
||
this->saveObject(e, mergedObjects, true, ignoreHasChanged);
|
||
|
||
}
|
||
}
|
||
++iterator;
|
||
}
|
||
}
|
||
|
Auch abrufbar als: Unified diff
ticket #594