diff --git a/test/models/product.hpp b/test/models/product.hpp index c2dd794..31e8218 100644 --- a/test/models/product.hpp +++ b/test/models/product.hpp @@ -30,8 +30,8 @@ struct product { namespace field = matador::access; using namespace matador::utils; field::primary_key(op, "product_name", product_name, 255); - field::has_one(op, "supplier_id", supplier, utils::cascade_type::ALL); - field::has_one(op, "category_id", category, utils::cascade_type::ALL); + field::belongs_to(op, "supplier_id", supplier, utils::cascade_type::ALL); + field::belongs_to(op, "category_id", category, utils::cascade_type::ALL); field::attribute(op, "quantity_per_unit", quantity_per_unit, 255); field::attribute(op, "unit_price", unit_price); field::attribute(op, "units_in_stock", units_in_stock);