has many fetch with join
This commit is contained in:
@@ -197,6 +197,9 @@ TEST_CASE_METHOD(SessionFixture, "Use session to find all objects with one-to-ma
|
||||
|
||||
all_departments = find_result.release();
|
||||
for (auto it = all_departments.begin(); it != all_departments.end(); ++it) {
|
||||
std::cout << "department: " << it->name << " (employees: " << it->employees.size() << ")\n";
|
||||
std::cout << "department: " << it->name << " (id: " << it->id << ", employees: " << it->employees.size() << ")\n";
|
||||
for (const auto& emp : it->employees) {
|
||||
std::cout << "\temployee: " << emp->first_name << " " << emp->last_name << "( " << emp->id << ")\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user