has many fetch with join

This commit is contained in:
Sascha Kühl
2025-02-19 14:51:42 +01:00
parent 784f6e768d
commit 8ab8274d93
19 changed files with 264 additions and 52 deletions
+4 -1
View File
@@ -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";
}
}
}