Fixed missing return in Service::loadById.
This commit is contained in:
+2
-1
@@ -45,8 +45,9 @@ public:
|
|||||||
QSharedPointer<T> loadById(int id) {
|
QSharedPointer<T> loadById(int id) {
|
||||||
odb::database *db = Context::instance().db();
|
odb::database *db = Context::instance().db();
|
||||||
odb::transaction tx(db->begin());
|
odb::transaction tx(db->begin());
|
||||||
db->template load<T>(id);
|
QSharedPointer<T> entity = db->template load<T>(id);
|
||||||
tx.commit();
|
tx.commit();
|
||||||
|
return entity;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user