Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 42d32a68

Von Christian Ehringfeld vor fast 9 Jahren hinzugefügt

  • ID 42d32a68633bca38c20a6d9c3d3b5bb921ce9aca
  • Vorgänger 9d62f4aa
  • Nachfolger 3ae1292f

fix...

Unterschiede anzeigen:

src/querybuilder.cpp
QSqlQuery QueryBuilder::find(const qint64 &id, const QString &tableName) const {
QString pk = "id";
QSqlQuery q = this->database->getQuery(this->selectBase(QStringList(
tableName)) + " WHERE " + pk + " = " + this->placeHolder(pk) + " LIMIT 1;");
tableName)) + " WHERE " + this->schema->quoteColumnName(pk) + " = " + this->placeHolder(pk) + " LIMIT 1;");
this->bindValue(pk, id, q);
return q;
}
......
const QSharedPointer<Entity> &entity, qint64 offset, QString pk) const {
QSqlQuery q = this->database->getQuery(this->selectBase(QStringList(
entity->getTablename())) + this->joinSuperClasses(
entity) + " WHERE " + this->schema->quoteColumnName(
pk) + "= " + this->placeHolder(pk) + this->limit(1, offset));
entity) + " WHERE " + this->schema->quoteColumnName(entity->getTablename() + "." + pk) + "= " + this->placeHolder(pk) + this->limit(1, offset));
this->bindValue(pk, id, q);
return q;
}

Auch abrufbar als: Unified diff