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());