introduced field_attributes shortcuts and added method on_base() to all processor classes
This commit is contained in:
@@ -46,14 +46,15 @@ struct Scenario : core::Model {
|
||||
|
||||
template<typename Operator>
|
||||
void process( Operator& op ) {
|
||||
namespace field = matador::access;
|
||||
using namespace matador;
|
||||
namespace field = access;
|
||||
field::process( op, *matador::base_class<Model>( this ) );
|
||||
field::attribute( op, "name", name, 511 );
|
||||
field::attribute( op, "name", name, UniqueVarChar511 );
|
||||
field::attribute( op, "mode", mode );
|
||||
field::attribute( op, "description", description, 511 );
|
||||
field::attribute( op, "description", description, VarChar511 );
|
||||
field::attribute( op, "symbol", symbol );
|
||||
field::attribute( op, "state", state );
|
||||
field::has_many( op, "collection_center", collection_center, "scenario_id", matador::utils::fetch_type::Lazy );
|
||||
field::has_many( op, "collection_center", collection_center, "scenario_id", utils::CascadeAllFetchLazy );
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user