⚲
Project
General
Profile
Sign in
Register
Home
Projects
Help
Search
:
Wt
All Projects
Wt
Overview
Activity
Roadmap
Issues
Wiki
Forums
Download (1.08 KB)
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
« Previous
1
2
Next »
(1-1/2)
Loading...