From 53793245198a626cb3e9d9acf1ecc78123d7429a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sascha=20K=C3=BChl?= Date: Fri, 18 Jul 2025 15:33:27 +0200 Subject: [PATCH] changed has_one to belongs_to --- test/models/product.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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);