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
+3 -3
View File
@@ -79,7 +79,7 @@ TEST_CASE_METHOD(QueryFixture, "Insert and select basic datatypes", "[query][dat
.from("types")
.fetch_one<types>(db);
REQUIRE(result.is_ok());
REQUIRE(*result != nullptr);
REQUIRE(result->get() != nullptr);
REQUIRE((*result)->id_ == 1);
REQUIRE((*result)->char_ == cval);
@@ -356,7 +356,7 @@ TEST_CASE_METHOD(QueryFixture, "Test primary key", "[query][primary key]") {
.from("pk")
.fetch_one<pk>(db);
REQUIRE(row.is_ok());
REQUIRE(*row != nullptr);
REQUIRE(row->get() != nullptr);
REQUIRE(row.value()->id > 0);
}
@@ -386,7 +386,7 @@ TEST_CASE_METHOD(QueryFixture, "Test primary key prepared", "[query][primary key
auto row = stmt->fetch_one<pk>();
REQUIRE(row.is_ok());
REQUIRE(*row != nullptr);
REQUIRE(*row);
REQUIRE(row.value()->id > 0);
REQUIRE(row.value()->name == "george");
}