Revision d2c33642
Von Christian Ehringfeld vor mehr als 10 Jahren hinzugefügt
| src/entitymanager.cpp | ||
|---|---|---|
|
|
||
|
bool EntityManager::hasChanged(QSharedPointer<Entity> &entity) {
|
||
|
bool changed = true;
|
||
|
if (entity->getId() >= -1) {
|
||
|
if (entity->getId() > -1) {
|
||
|
changed = false;
|
||
|
auto listmap = this->findByPk(entity->getId(), entity);
|
||
|
auto relations = entity->getRelations();
|
||
| ... | ... | |
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
}
|
||
|
return changed;
|
||
|
}
|
||
| ... | ... | |
|
QSharedPointer<Entity> ptr;
|
||
|
for (int var = 0; var < list.size(); ++var) {
|
||
|
ptr = list.at(var);
|
||
|
if (this->shouldBeSaved(ptr, r) && this->save(ptr)) {
|
||
|
if (this->shouldBeSaved(ptr, r) && this->hasChanged(ptr) && this->save(ptr)) {
|
||
|
saved.append(ptr);
|
||
|
}
|
||
|
}
|
||
Auch abrufbar als: Unified diff
temporary fix for #578