Skip to content

Commit 1d433fc

Browse files
committed
fix: SQL logic error
1 parent 6567ddb commit 1d433fc

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tests/unique_cases/issue1446.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,13 @@ TEST_CASE("issue1446") {
4141
make_column("deptno", &Department::m_deptno, primary_key().autoincrement()),
4242
make_column("deptname", &Department::m_deptname),
4343
make_column("loc", &Department::m_loc, null())));
44-
44+
storage.sync_schema(true);
45+
storage.insert(Department{10, "Accounts", "New York"});
46+
storage.insert(Employee{1, "Paul", "Salesman", 2, "2002-02-12", 20000.0, 0.0, 1});
47+
storage.insert(Employee{2, "Allen", "Salesman", 2, "2002-02-12", 20000.0, 0.0, 1});
4548
for (auto&& [obj, obj2, col]:
4649
storage.iterate(select(columns(object<Employee>(true), object<Department>(true), &Department::m_deptno),
50+
from<Employee>(),
4751
join<Department>(on(c(&Employee::m_depno) == c(&Department::m_deptno)))))) {
4852
STATIC_REQUIRE(std::is_same_v<decltype(obj), Employee>);
4953
STATIC_REQUIRE(std::is_same_v<decltype(obj2), Department>);

0 commit comments

Comments
 (0)