Project

General

Profile

Error using Wt::Dbo » TestTable.h

Freddy Martinez Garcia, 08/10/2015 09:50 PM

 
#ifndef TESTTABLE_H
#define TESTTABLE_H

#include <Wt/Dbo/Dbo>
#include "utils/definitions.h"
#include "db/schema/TestContentTable.h"

class TestContentTable;

class TestTable
{
private:
string m_name;
string m_description;
dbo::collection<dbo::ptr<TestContentTable>> m_testContentList;

public:
TestTable(const string& name,
const string& description);

inline const string& name() const noexcept {return this->m_name;}
inline const string& description() const noexcept {return this->m_description;}
inline void setName(const string& name) noexcept {this->m_name = name;}
inline void setDescription(const string& description) noexcept {this->m_description = description;}

template <class Action>
void persist(Action& a)
{
dbo::field(a, this->m_name, TB_TEST_NAME);
dbo::field(a, this->m_description, TB_TEST_DESCRIPTION);
dbo::hasMany(a, this->m_testContentList, dbo::ManyToOne, TEST_TESTCONTENT_RELATION);
}

~TestTable(){}
};

#endif // TESTTABLE_H
(1-1/2)