collection resolver progress
This commit is contained in:
@@ -165,9 +165,12 @@ TEST_CASE_METHOD(SessionFixture, "Use session to find all objects", "[session][f
|
||||
}
|
||||
|
||||
TEST_CASE_METHOD(SessionFixture, "Use session to find all objects with one-to-many lazy relation", "[session][find][one-to-many][eager]") {
|
||||
auto result = schema.attach<author>("authors")
|
||||
.and_then( [this] { return schema.attach<book>("books"); } )
|
||||
// auto result = schema.attach<author>("authors")
|
||||
// .and_then( [this] { return schema.attach<book>("books"); } )
|
||||
auto result = schema.attach<book>("books")
|
||||
.and_then( [this] { return schema.attach<author>("authors"); } )
|
||||
.and_then([this] { return schema.create(db); } );
|
||||
REQUIRE(result.is_ok());
|
||||
|
||||
schema.initialize_executor(ses);
|
||||
std::vector authors {
|
||||
@@ -217,11 +220,14 @@ TEST_CASE_METHOD(SessionFixture, "Use session to find all objects with one-to-ma
|
||||
}
|
||||
|
||||
TEST_CASE_METHOD(SessionFixture, "Use session to find all objects with one-to-many eager relation", "[session][find][one-to-many][eager]") {
|
||||
auto result = schema.attach<department>("departments")
|
||||
.and_then( [this] { return schema.attach<employee>("employees"); } )
|
||||
// auto result = repo.attach<department>("departments")
|
||||
// .and_then([this] { return repo.attach<employee>("employees"); })
|
||||
auto result = schema.attach<employee>("employees")
|
||||
.and_then([this] { return schema.attach<department>("departments"); })
|
||||
.and_then([this] {
|
||||
return schema.create(db);
|
||||
} );
|
||||
REQUIRE(result.is_ok());
|
||||
|
||||
std::vector<std::unique_ptr<department>> departments;
|
||||
departments.emplace_back(new department{1, "Insurance"});
|
||||
|
||||
Reference in New Issue
Block a user