/*
* Copyright (C) 2010 Ixonos Plc.
+ * Copyright (C) 2011 Philipp Spitzer, gregor herrmann
*
* This file is part of ConfClerk.
*
}
// updates specified column 'col'
-// if the value is not specified as an argument,
-// it's taken from the reford itself
+// if the value is not specified as an argument,
+// it's taken from the record itself
// see also: setValue() method for more details
template <typename T>
void OrmRecord<T>::update(QString col, QVariant value)
else // take 'col' value from the record; see setValue()
query.bindValue(":col", convertToDb(this->value(col), this->value(col).type()));
query.bindValue(":id", this->value("id"));
- //query.bindValue(":id", convertToDb(value("id"), QVariant::Int));
query.exec();
}
qDebug() << "Error: " << query.lastError().driverText() << "; Type: " << query.lastError().type();
throw OrmSqlException(query.lastError().text());
}
- else
- {
- /*qDebug() << "SQL OK";*/
- }
}
QList<T> objects;
{
objects << hydrate(query.record());
}
- /*qDebug() << "Fetch done";*/
return objects;
}