Revision 719a0ba1
Von Christian Ehringfeld vor mehr als 9 Jahren hinzugefügt
samples/example/Example.pro | ||
---|---|---|
models/contact.cpp \
|
||
models/faker/createfakemodeldata.cpp
|
||
|
||
unix:!macx: LIBS += -L$$PWD/../../../build-EntityManager-Desktop-Debug -lCuteEntityManager
|
||
unix:!macx:CONFIG(debug, debug): LIBS += -L$$PWD/../../../build-EntityManager-Desktop-Debug -lCuteEntityManager
|
||
else:unix:!macx:CONFIG(release, release): LIBS += -L$$PWD/../../../build-EntityManager-Desktop-Release/ -lCuteEntityManager
|
||
unix:INCLUDEPATH += $$PWD/../../src
|
||
unix:DEPENDPATH += $$PWD/../../src
|
||
CONFIG += c++14
|
||
... | ... | |
|
||
win32:INCLUDEPATH += $$PWD/../../build-EntityManager-Desktop_Qt_5_4_1_MinGW_32bit-Debug/debug
|
||
win32:DEPENDPATH += $$PWD/../../build-EntityManager-Desktop_Qt_5_4_1_MinGW_32bit-Debug/debug
|
||
|
||
|
src/database.cpp | ||
---|---|---|
}
|
||
|
||
bool Database::rollbackTransaction() {
|
||
qDebug() << "Transaction rolled back!";
|
||
qDebug() << "Transaction rolled back!" << this->database.lastError().text();
|
||
return supportTransactions && this->database.rollback();
|
||
}
|
||
|
src/entitymanager.cpp | ||
---|---|---|
}
|
||
++iterator;
|
||
}
|
||
|
||
}
|
||
|
||
void EntityManager::persistMappedByRelation(const QList<QSharedPointer<Entity> >
|
||
... | ... | |
|| r.getCascadeType().contains(MERGE)
|
||
|| r.getCascadeType().contains(PERSIST) ? this->saveRelationEntities(list,
|
||
r) : list;
|
||
this->db->startTransaction();
|
||
auto builder = this->schema->getQueryBuilder();
|
||
q = builder->manyToManyInsert(tblName,
|
||
builder->generateManyToManyColumnName(entity),
|
||
... | ... | |
}
|
||
}
|
||
}
|
||
if (!this->db->commitTransaction()) {
|
||
this->db->rollbackTransaction();
|
||
}
|
||
}
|
||
|
||
|
Auch abrufbar als: Unified diff
improvements