Revision 1cee0f5b
Von Christian Ehringfeld vor fast 9 Jahren hinzugefügt
src/querybuilder.cpp | ||
---|---|---|
|
||
QSqlQuery QueryBuilder::insert(const QString &tableName,
|
||
QHash<QString, QVariant> &attributes, const QString &primaryKey) const {
|
||
attributes.remove(primaryKey);
|
||
//if(attributes.size() == 1) {
|
||
// attributes.insert(primaryKey,QVariant("null"));
|
||
// } else {
|
||
attributes.remove(primaryKey);
|
||
// }
|
||
QSqlQuery q = this->database.data()->getQuery();
|
||
QString p1 = "INSERT INTO " + this->schema.data()->quoteTableName(
|
||
tableName) + "(";
|
||
... | ... | |
} else if (v.canConvert<QPointer<Entity>>()) {
|
||
this->insertRelationId(qvariant_cast<QPointer<Entity>>(v).data(), map, i.key());
|
||
}
|
||
++i;
|
||
}
|
||
++i;
|
||
}
|
||
return map;
|
||
}
|
Auch abrufbar als: Unified diff
stupid stuff