Revision b5d490c7
Von Christian Ehringfeld vor fast 9 Jahren hinzugefügt
src/querybuilder.cpp | ||
---|---|---|
const {
|
||
QList<QSqlQuery> queries = QList<QSqlQuery>();
|
||
queries.append(this->remove(entity->getTablename(),
|
||
entity->property(entity->getPrimaryKey()).toLongLong()));
|
||
entity->getProperty(entity->getPrimaryKey()).toLongLong()));
|
||
if (entity->getInheritanceStrategy() != PER_CLASS_TABLE
|
||
&& entity->isInheritanceCascaded()) {
|
||
auto classes = entity->superClasses(true);
|
||
... | ... | |
auto instance = EntityInstanceFactory::createInstance(item->className());
|
||
if (instance) {
|
||
queries.append(this->remove(instance->getTablename(),
|
||
entity->property(entity->getPrimaryKey()).toLongLong()));
|
||
entity->getProperty(entity->getPrimaryKey()).toLongLong()));
|
||
delete instance;
|
||
instance = 0;
|
||
}
|
||
... | ... | |
foreignKey) + " WHERE " + this->schema->quoteColumnName(
|
||
attribute) + "=:id;";
|
||
q.prepare(sql);
|
||
q.bindValue(":id", id);
|
||
q.bindValue(":id", QVariant(id));
|
||
return q;
|
||
}
|
||
|
||
... | ... | |
void QueryBuilder::insertRelationId(const Entity *e,
|
||
QHash<QString, QVariant> &map,
|
||
QString relName) const {
|
||
if (e && e->property(e->getPrimaryKey()).toLongLong() > -1) {
|
||
if (e && e->getProperty(e->getPrimaryKey()).toLongLong() > -1) {
|
||
map.insert(this->generateColumnNameID(relName),
|
||
e->property(e->getPrimaryKey()));
|
||
e->getProperty(e->getPrimaryKey()));
|
||
}
|
||
}
|
||
|
Auch abrufbar als: Unified diff
fix