diff --git a/include/sqlite_orm/sqlite_orm.h b/include/sqlite_orm/sqlite_orm.h index 22c493422..45c43a32b 100644 --- a/include/sqlite_orm/sqlite_orm.h +++ b/include/sqlite_orm/sqlite_orm.h @@ -12358,7 +12358,7 @@ namespace sqlite_orm { auto stmt = statement.stmt; sqlite3_reset(stmt); for(auto it = statement.t.range.first; it != statement.t.range.second; ++it) { - auto &o = *it; + const auto &o = *it; tImpl.table.for_each_column([&o, &index, &stmt, db](auto &c) { using column_type = typename std::decay::type; using field_type = typename column_type::field_type;