progress on combining foreign_node_completer and relation_completer
This commit is contained in:
+1
-1
@@ -27,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", matador::utils::default_foreign_attributes );
|
||||
field::has_many( op, "books", books, "author_id", matador::utils::CascadeNoneFetchLazy );
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@ struct book {
|
||||
namespace field = matador::access;
|
||||
field::primary_key( op, "id", id );
|
||||
field::attribute( op, "title", title, 511 );
|
||||
field::belongs_to( op, "author_id", book_author, matador::utils::default_foreign_attributes );
|
||||
field::belongs_to( op, "author_id", book_author, matador::utils::CascadeNoneFetchLazy );
|
||||
field::attribute( op, "published_in", published_in );
|
||||
}
|
||||
};
|
||||
|
||||
+2
-2
@@ -49,7 +49,7 @@ struct book {
|
||||
namespace field = matador::access;
|
||||
field::primary_key( op, "id", id );
|
||||
field::attribute( op, "title", title, 511 );
|
||||
field::has_one( op, "author_id", book_author, matador::utils::default_foreign_attributes );
|
||||
field::has_one( op, "author_id", book_author, matador::utils::CascadeNoneFetchLazy );
|
||||
field::attribute( op, "published_in", published_in );
|
||||
}
|
||||
};
|
||||
@@ -89,7 +89,7 @@ struct job {
|
||||
void process( Operator& op ) {
|
||||
namespace field = matador::access;
|
||||
field::primary_key( op, "id", id );
|
||||
field::belongs_to( op, "payload", data, matador::utils::default_foreign_attributes );
|
||||
field::belongs_to( op, "payload", data, matador::utils::CascadeNoneFetchLazy );
|
||||
field::attribute( op, "type", type, 511 );
|
||||
field::attribute( op, "description", description, 511 );
|
||||
field::attribute( op, "state", state );
|
||||
|
||||
+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 );
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ struct IdListPayload : Payload {
|
||||
void process( Operator& op ) {
|
||||
namespace field = matador::access;
|
||||
field::process( op, *matador::base_class<Payload>( this ) );
|
||||
field::has_many( op, "payload_ids", payload_ids, "payload_id", matador::utils::default_foreign_attributes );
|
||||
field::has_many( op, "payload_ids", payload_ids, "payload_id", matador::utils::CascadeNoneFetchLazy );
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user