Fix missing "using namespace drogon::orm;" at autogenerated restful controller (#1178)

This commit is contained in:
davidschedler 2022-02-16 04:10:13 +01:00 committed by GitHub
parent 4b31f93767
commit 0e3ee5fad0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -19,6 +19,7 @@ auto modelName = tableInfo.get<std::string>("className");
$$<<"#include \""<<modelName<<".h\"\n";
bool hasPrimaryKey = (tableInfo.get<int>("hasPrimaryKey")==1);
$$<<"using namespace drogon;\n";
$$<<"using namespace drogon::orm;\n";
$$<<"using namespace drogon_model::"<<tableInfo.get<std::string>("dbName");
auto &schema=tableInfo.get<std::string>("schema");
@ -83,4 +84,4 @@ class [[className]]Base : public RestfulController
{
$$<<"}\n";
}
%>
%>