From 3e3bd6d012c12943932764b27bec160b504d09fb Mon Sep 17 00:00:00 2001 From: Dario Date: Tue, 1 Sep 2020 11:47:19 +0200 Subject: [PATCH] fix error only occuring in linux --- src/cpp/controller/Group.cpp | 3 ++- src/cpp/controller/HederaAccount.cpp | 7 ++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/cpp/controller/Group.cpp b/src/cpp/controller/Group.cpp index 2d809da07..f835e6986 100644 --- a/src/cpp/controller/Group.cpp +++ b/src/cpp/controller/Group.cpp @@ -42,7 +42,8 @@ namespace controller { // work around for not working call to loadAllFromDB auto cm = ConnectionManager::getInstance(); - Poco::Data::Statement select(cm->getConnection(CONNECTION_MYSQL_LOGIN_SERVER)); + auto session = cm->getConnection(CONNECTION_MYSQL_LOGIN_SERVER); + Poco::Data::Statement select(session); select << "SELECT id, alias, name, url, description FROM " << db->getTableName() , Poco::Data::Keywords::into(group_list); diff --git a/src/cpp/controller/HederaAccount.cpp b/src/cpp/controller/HederaAccount.cpp index 6172db46c..58c71b5ec 100644 --- a/src/cpp/controller/HederaAccount.cpp +++ b/src/cpp/controller/HederaAccount.cpp @@ -46,10 +46,11 @@ namespace controller { auto db = new model::table::HederaAccount(); std::vector group_list; // throw an unresolved external symbol error - //group_list = db->loadAllFromDB(); + group_list = db->loadAllFromDB(); // work around for not working call to loadAllFromDB - auto cm = ConnectionManager::getInstance(); + /*auto cm = ConnectionManager::getInstance(); + Poco::Data::Statement select(cm->getConnection(CONNECTION_MYSQL_LOGIN_SERVER)); select << "SELECT id, alias, name, url, description FROM " << db->getTableName() @@ -62,7 +63,7 @@ namespace controller { catch (Poco::Exception& ex) { printf("[Group::listAll] poco exception: %s\n", ex.displayText().data()); } - // work around end + //*/ //work around end std::vector> resultVector; resultVector.reserve(group_list.size());