introduced field_attributes shortcuts and added method on_base() to all processor classes
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
#define QUERY_AUTHOR_HPP
|
||||
|
||||
#include "matador/utils/access.hpp"
|
||||
#include "matador/utils/field_attributes.hpp"
|
||||
|
||||
#include "matador/object/object_ptr.hpp"
|
||||
#include "matador/object/collection.hpp"
|
||||
@@ -32,9 +33,9 @@ struct author {
|
||||
void process(Operator &op) {
|
||||
namespace field = matador::access;
|
||||
field::primary_key(op, "id", id);
|
||||
field::attribute(op, "first_name", first_name, 63);
|
||||
field::attribute(op, "last_name", last_name, 63);
|
||||
field::attribute(op, "date_of_birth", date_of_birth, 31);
|
||||
field::attribute(op, "first_name", first_name, VarChar63);
|
||||
field::attribute(op, "last_name", last_name, VarChar63);
|
||||
field::attribute(op, "date_of_birth", date_of_birth, VarChar63);
|
||||
field::attribute(op, "year_of_birth", year_of_birth);
|
||||
field::attribute(op, "distinguished", distinguished);
|
||||
field::has_many(op, "books", books, "author_id", utils::CascadeAllFetchLazy);
|
||||
|
||||
Reference in New Issue
Block a user