Fix errors in the Mapper class template

This commit is contained in:
antao 2018-11-18 00:11:15 +08:00
parent 0a25d6ad85
commit 75d6145b56

View File

@ -712,7 +712,7 @@ inline void Mapper<T>::update(const T &obj,
std::string sql = "update ";
sql += T::tableName;
sql += " set ";
for (auto colName : T::updateColumns())
for (auto colName : obj.updateColumns())
{
sql += colName;
sql += " = $?,";
@ -738,7 +738,7 @@ inline std::future<size_t> Mapper<T>::updateFuture(const T &obj) noexcept
std::string sql = "update ";
sql += T::tableName;
sql += " set ";
for (auto colName : T::updateColumns())
for (auto colName : obj.updateColumns())
{
sql += colName;
sql += " = $?,";