introduced field_attributes shortcuts and added method on_base() to all processor classes
This commit is contained in:
@@ -16,10 +16,11 @@ struct Payload : core::Model {
|
||||
|
||||
template<typename Operator>
|
||||
void process( Operator& op ) {
|
||||
using namespace matador;
|
||||
namespace field = matador::access;
|
||||
field::process( op, *matador::base_class<Model>( this ) );
|
||||
field::attribute( op, "type", type, 255 );
|
||||
field::belongs_to( op, "job", job, matador::utils::CascadeAllFetchLazy );
|
||||
field::attribute( op, "type", type, VarChar255 );
|
||||
field::belongs_to( op, "job", job, utils::CascadeAllFetchLazy );
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user