diff --git a/drogon_ctl/create_model.cc b/drogon_ctl/create_model.cc index 6201229a..0c580d40 100644 --- a/drogon_ctl/create_model.cc +++ b/drogon_ctl/create_model.cc @@ -76,6 +76,11 @@ void create_model::createModelClassFromPG(const std::string &path, const DbClien AND table_name = $1" << tableName << Mode::Blocking >> [&](const Result &r) { + if (r.size() == 0) + { + std::cout << " ---Can't create model from the table " << tableName << ", please check privileges on the table." << std::endl; + return; + } for (size_t i = 0; i < r.size(); i++) { auto row = r[i];