diff --git a/core/service.h b/core/service.h index 6e22098..a317212 100644 --- a/core/service.h +++ b/core/service.h @@ -45,8 +45,9 @@ public: QSharedPointer loadById(int id) { odb::database *db = Context::instance().db(); odb::transaction tx(db->begin()); - db->template load(id); + QSharedPointer entity = db->template load(id); tx.commit(); + return entity; } };