implemented lazy loading for object_ptr and belongs_to

This commit is contained in:
2026-01-15 12:40:54 +01:00
parent db8e137c11
commit 7626331866
81 changed files with 1790 additions and 927 deletions
+6
View File
@@ -11,6 +11,9 @@ namespace matador::test {
struct employee;
struct department {
department() = default;
department(const unsigned int id, std::string name)
: id(id), name(std::move(name)) {}
unsigned int id{};
std::string name;
std::vector<object::object_ptr<employee>> employees{};
@@ -27,6 +30,9 @@ struct department {
};
struct employee {
employee() = default;
employee(const unsigned int id, std::string first, std::string last, object::object_ptr<department> dep)
: id(id), first_name(std::move(first)), last_name(std::move(last)), dep(std::move(dep)) {}
unsigned int id{};
std::string first_name;
std::string last_name;