Added ability to store creator, updater, date of create and date of edit on entities- columns for this added to Voucher and CampData.

Removed permission check from Service::loadById- caused access violation when user had not have read permission.
This commit is contained in:
2017-08-21 14:16:43 +02:00
parent eff4190c99
commit 836521e533
11 changed files with 176 additions and 4 deletions
+4
View File
@@ -349,6 +349,8 @@ void ShopService::saveVoucher(VoucherPtr entity)
Transaction tr;
odb::database *db = Context::instance().db();
addDateAndUser(entity, true);
db->persist(entity);
foreach (QSharedPointer<VoucherItem> item, entity->items()) {
@@ -371,6 +373,8 @@ void ShopService::updateVoucher(VoucherPtr entity)
db->persist(item);
}
addDateAndUser(entity, false);
db->update(entity);
tr.commit();