progress on relation completer

This commit is contained in:
Sascha Kühl
2025-07-04 16:05:00 +02:00
parent 9c7628b6cb
commit 8f2d07518f
10 changed files with 152 additions and 63 deletions
+1 -2
View File
@@ -18,7 +18,6 @@ struct author {
bool distinguished{false};
matador::object::collection<matador::object::object_ptr<book>> books;
template<typename Operator>
void process( Operator& op ) {
namespace field = matador::access;
@@ -28,7 +27,7 @@ struct author {
field::attribute( op, "date_of_birth", date_of_birth, 31 );
field::attribute( op, "year_of_birth", year_of_birth );
field::attribute( op, "distinguished", distinguished );
field::has_many( op, "books", books, "author_id" );
field::has_many( op, "books", books, "author_id", matador::utils::default_foreign_attributes );
}
};
}