#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();
}

