implemented lazy loading for object_ptr and belongs_to
This commit is contained in:
@@ -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");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user