fix error only occuring in linux

This commit is contained in:
Dario 2020-09-01 11:47:19 +02:00
parent e866e53d60
commit 3e3bd6d012
2 changed files with 6 additions and 4 deletions

View File

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

View File

@ -46,10 +46,11 @@ namespace controller {
auto db = new model::table::HederaAccount();
std::vector<model::table::HederaAccountTuple> group_list;
// throw an unresolved external symbol error
//group_list = db->loadAllFromDB<model::table::GroupTuple>();
group_list = db->loadAllFromDB<model::table::HederaAccountTuple>();
// 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<Poco::AutoPtr<HederaAccount>> resultVector;
resultVector.reserve(group_list.size());