progress on combining foreign_node_completer and relation_completer
This commit is contained in:
+3
-3
@@ -82,7 +82,7 @@ struct profile {
|
||||
field::primary_key( op, "id", id );
|
||||
field::attribute( op, "first_name", first_name, 255 );
|
||||
field::attribute( op, "last_name", last_name, 255 );
|
||||
field::belongs_to( op, "user_id", user, matador::utils::default_foreign_attributes );
|
||||
field::belongs_to( op, "user_id", user, matador::utils::CascadeNoneFetchLazy );
|
||||
}
|
||||
};
|
||||
struct user {
|
||||
@@ -95,7 +95,7 @@ struct user {
|
||||
namespace field = matador::access;
|
||||
field::primary_key( op, "id", id );
|
||||
field::attribute( op, "username", username, 255 );
|
||||
field::has_one(op, "profile_id", profile, matador::utils::default_foreign_attributes );
|
||||
field::has_one(op, "profile_id", profile, matador::utils::CascadeNoneFetchLazy );
|
||||
}
|
||||
};
|
||||
|
||||
@@ -119,7 +119,7 @@ struct person_repo {
|
||||
void process(Operator &op) {
|
||||
namespace field = matador::access;
|
||||
field::primary_key( op, "id", id );
|
||||
field::has_many( op, "person_list", person_list, "person_id", matador::utils::default_foreign_attributes );
|
||||
field::has_many( op, "person_list", person_list, "person_id", matador::utils::CascadeNoneFetchLazy );
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user