Commit df059e91 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

Don't cache an unexisting row

parent 8f49e59c
......@@ -62,6 +62,8 @@ class Cache
static const std::string req = "SELECT * FROM " + TABLEPOLICY::Name +
" WHERE " + TABLEPOLICY::CacheColumn + " = ?";
auto res = sqlite::Tools::fetchOne<IMPL>( dbConnectionWeak, req.c_str(), key );
if ( res == nullptr )
return nullptr;
Store[key] = res;
return res;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment