has one progress

This commit is contained in:
2026-05-15 15:22:59 +02:00
parent 22f6f71412
commit 57703dfb67
44 changed files with 288 additions and 121 deletions
+4 -4
View File
@@ -53,13 +53,13 @@ void attribute(Operator &op, const char *id, std::optional<Type> &value, const u
}
template<class Operator, class Type>
void has_one(Operator &op, const char *id, Type &value, const utils::foreign_attributes &attr = utils::CascadeNoneFetchLazy) {
op.on_has_one(id, value, attr);
void belongs_to(Operator &op, const char *id, Type &value, const utils::foreign_attributes &attr = utils::CascadeNoneFetchLazy) {
op.on_belongs_to(id, value, attr);
}
template<class Operator, class Type>
void belongs_to(Operator &op, const char *id, Type &value, const utils::foreign_attributes &attr = utils::CascadeNoneFetchLazy) {
op.on_belongs_to(id, value, attr);
void has_one(Operator &op, const char *id, Type &value, const char *join_column, const utils::foreign_attributes &attr = utils::CascadeNoneFetchLazy) {
op.on_has_one(id, value, join_column, attr);
}
template<class Operator, class Type, template<class ...> class ContainerType>
@@ -38,7 +38,7 @@ public:
template<class P>
static void on_belongs_to(const char * /*id*/, P &, const foreign_attributes & ) {}
template<class P>
static void on_has_one(const char * /*id*/, P &, const foreign_attributes & ) {}
static void on_has_one(const char * /*id*/, P &, const char * /*join_column*/, const foreign_attributes & ) {}
template<class C>
static void on_has_many(const char * /*id*/, C &, const char * /*join_column*/, const foreign_attributes & ) {}
template<class C>
@@ -65,7 +65,7 @@ struct pk_unset_checker {
template<class P>
static void on_belongs_to(const char * /*id*/, P &, const foreign_attributes & ) {}
template<class P>
static void on_has_one(const char * /*id*/, P &, const foreign_attributes & ) {}
static void on_has_one(const char * /*id*/, P &, const char * /*join_column*/, const foreign_attributes & ) {}
template<class C>
static void on_has_many(const char * /*id*/, C &, const char * /*join_column*/, const foreign_attributes & ) {}
template<class C>
@@ -89,7 +89,7 @@ struct primary_key_getter {
template<class P>
static void on_belongs_to(const char * /*id*/, P &, const foreign_attributes & ) {}
template<class P>
static void on_has_one(const char * /*id*/, P &, const foreign_attributes & ) {}
static void on_has_one(const char * /*id*/, P &, const char * /*join_column*/, const foreign_attributes & ) {}
template<class C>
static void on_has_many(const char * /*id*/, C &, const char * /*join_column*/, const foreign_attributes & ) {}
template<class C>