introduced field_attributes shortcuts and added method on_base() to all processor classes
This commit is contained in:
+4
-3
@@ -15,10 +15,11 @@ struct book {
|
||||
|
||||
template<typename Operator>
|
||||
void process( Operator& op ) {
|
||||
namespace field = matador::access;
|
||||
using namespace matador;
|
||||
namespace field = access;
|
||||
field::primary_key( op, "id", id );
|
||||
field::attribute( op, "title", title, 511 );
|
||||
field::belongs_to( op, "author_id", book_author, matador::utils::CascadeNoneFetchLazy );
|
||||
field::attribute( op, "title", title, VarChar511 );
|
||||
field::belongs_to( op, "author_id", book_author, utils::CascadeNoneFetchLazy );
|
||||
field::attribute( op, "published_in", published_in );
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user