From 948832640a5c0aace5812d874b17b8159701135c Mon Sep 17 00:00:00 2001 From: antao Date: Thu, 6 Dec 2018 18:06:17 +0800 Subject: [PATCH] Update Mapper.h --- orm_lib/inc/drogon/orm/Mapper.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/orm_lib/inc/drogon/orm/Mapper.h b/orm_lib/inc/drogon/orm/Mapper.h index d652b3ab..eab8cd1a 100644 --- a/orm_lib/inc/drogon/orm/Mapper.h +++ b/orm_lib/inc/drogon/orm/Mapper.h @@ -98,7 +98,7 @@ class Mapper const ExceptionCallback &ecb) noexcept; std::future insertFuture(const T &) noexcept; - size_t update(T &obj) noexcept(false); + size_t update(const T &obj) noexcept(false); void update(const T &obj, const CountCallback &rcb, const ExceptionCallback &ecb) noexcept; @@ -771,7 +771,7 @@ inline std::future Mapper::insertFuture(const T &obj) noexcept return prom->get_future(); } template -inline size_t Mapper::update(T &obj) noexcept(false) +inline size_t Mapper::update(const T &obj) noexcept(false) { clear(); static_assert(!std::is_same::value, "No primary key in the table!");