You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
508 B
C++
29 lines
508 B
C++
#include "accommodationservice.h"
|
|
|
|
#include <odb/database.hxx>
|
|
#include <odb/transaction.hxx>
|
|
|
|
#include "accommodation-odb.hxx"
|
|
|
|
AccommodationService::AccommodationService()
|
|
:Service<Person>("ACCOMMODATION")
|
|
{
|
|
}
|
|
|
|
AccommodationService::~AccommodationService()
|
|
{
|
|
|
|
}
|
|
|
|
void AccommodationService::pokus(QSharedPointer<Person> entity)
|
|
{
|
|
odb::database *db = Context::instance().db();
|
|
//odb::transaction tr(db->begin());
|
|
|
|
Transaction tr;
|
|
this->all();
|
|
db->persist(entity);
|
|
tr.commit();
|
|
}
|
|
|