added to many fields to entities author, book, recipe and ingredient
This commit is contained in:
@@ -15,6 +15,7 @@ struct author
|
||||
std::string date_of_birth;
|
||||
unsigned short year_of_birth{};
|
||||
bool distinguished{false};
|
||||
std::vector<matador::sql::entity<book>> books;
|
||||
|
||||
template<typename Operator>
|
||||
void process(Operator &op)
|
||||
@@ -26,6 +27,7 @@ struct author
|
||||
field::attribute(op, "date_of_birth", date_of_birth, 31);
|
||||
field::attribute(op, "year_of_birth", year_of_birth);
|
||||
field::attribute(op, "distinguished", distinguished);
|
||||
field::has_many(op, "books", books, "author_id", "id", utils::fetch_type::LAZY);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user