#ifndef __TAG_H__ #define __TAG_H__ #include class Post; using Posts= Wt::Dbo::collection> ; class Tag { public: Tag() = default; Tag(const std::string &aName) : name(aName) { } template void persist(Action &a) { Wt::Dbo::field(a, name, "name"); Wt::Dbo::hasMany(a, posts, Wt::Dbo::ManyToMany, "post_tag"); } std::string name; Posts posts; }; DBO_EXTERN_TEMPLATES(Tag) #endif // __TAG_H__