introduced field_attributes shortcuts and added method on_base() to all processor classes
This commit is contained in:
@@ -26,10 +26,10 @@ struct product {
|
||||
void process(Operator &op) {
|
||||
namespace field = matador::access;
|
||||
using namespace matador::utils;
|
||||
field::primary_key(op, "product_name", product_name, 255);
|
||||
field::primary_key(op, "product_name", product_name, ManualVarChar511);
|
||||
field::belongs_to(op, "supplier_id", seller, CascadeAllFetchLazy);
|
||||
field::belongs_to(op, "category_id", type, CascadeAllFetchLazy);
|
||||
field::attribute(op, "quantity_per_unit", quantity_per_unit, 255);
|
||||
field::attribute(op, "quantity_per_unit", quantity_per_unit, VarChar255);
|
||||
field::attribute(op, "unit_price", unit_price);
|
||||
field::attribute(op, "units_in_stock", units_in_stock);
|
||||
field::attribute(op, "units_in_order", units_in_order);
|
||||
|
||||
Reference in New Issue
Block a user