enabled has_many processing for test models
This commit is contained in:
@@ -16,14 +16,14 @@ struct ingredient
|
||||
{
|
||||
unsigned int id{};
|
||||
std::string name;
|
||||
std::vector<matador::object::object_ptr<recipe>> recipes;
|
||||
std::vector<object::object_ptr<recipe>> recipes;
|
||||
|
||||
template<class Operator>
|
||||
void process(Operator &op) {
|
||||
namespace field = matador::access;
|
||||
field::primary_key(op, "id", id);
|
||||
field::attribute(op, "name", name, 255);
|
||||
// field::has_many_to_many(op, "recipe_ingredients", recipes, "ingredient_id", "recipe_id", utils::fetch_type::EAGER);
|
||||
field::has_many_to_many(op, "recipe_ingredients", recipes, "ingredient_id", "recipe_id", utils::fetch_type::EAGER);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -31,14 +31,14 @@ struct recipe
|
||||
{
|
||||
unsigned int id{};
|
||||
std::string name;
|
||||
std::vector<matador::object::object_ptr<ingredient>> ingredients;
|
||||
std::vector<object::object_ptr<ingredient>> ingredients;
|
||||
|
||||
template<class Operator>
|
||||
void process(Operator &op) {
|
||||
namespace field = matador::access;
|
||||
field::primary_key(op, "id", id);
|
||||
field::attribute(op, "name", name, 255);
|
||||
// field::has_many_to_many(op, "recipe_ingredients", ingredients, utils::fetch_type::LAZY);
|
||||
field::has_many_to_many(op, "recipe_ingredients", ingredients, utils::fetch_type::LAZY);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user