Revision 2c29a044
Von Christian Ehringfeld vor mehr als 7 Jahren hinzugefügt
src/entitymanager.cpp | ||
---|---|---|
validate, relationsIgnoreHasChanged);
|
||
}
|
||
}
|
||
return merged ? true : false;
|
||
return true;
|
||
}
|
||
|
||
bool EntityManager::mergeObject(QSharedPointer<Entity> &entity,
|
||
... | ... | |
bool ok = true;
|
||
if (entity && !mergedObjects.contains(entity.data())) {
|
||
mergedObjects.append(entity.data());
|
||
ok = false;
|
||
if (entity->getId() > -1 && (!validate || this->validate(entity))) {
|
||
if (withRelations) {
|
||
this->savePrePersistedRelations(entity, mergedObjects,
|
||
... | ... | |
bool rc = true;
|
||
if (entity && !mergedObjects.contains(entity.data())) {
|
||
mergedObjects.append(entity.data());
|
||
rc = false;
|
||
if (this->checkTable(entity) && (!validate || this->validate(entity))
|
||
&& (!checkDuplicate || this->count(entity) <= 0)) {
|
||
if (persistRelations) {
|
||
... | ... | |
this->savePostPersistedRelations(entity, mergedObjects,
|
||
relationsIgnoreHasChanged, true);
|
||
}
|
||
rc = true;
|
||
}
|
||
}
|
||
entity->idChanged();
|
||
... | ... | |
bool ok = true;
|
||
auto merged = QList<Entity *>();
|
||
foreach (QSharedPointer<Entity> ent, entities) {
|
||
this->createObject(ent, merged, persistRelations,
|
||
ok = this->createObject(ent, merged, persistRelations,
|
||
checkDuplicate, validate, relationsIgnoreHasChanged);
|
||
}
|
||
return ok;
|
Auch abrufbar als: Unified diff
imp