diff --git a/include/sqlpp11/statement.h b/include/sqlpp11/statement.h index 64d17e82..615a50cb 100644 --- a/include/sqlpp11/statement.h +++ b/include/sqlpp11/statement.h @@ -112,7 +112,7 @@ namespace sqlpp ::sqlpp::detail::make_intersect_set_t< required_tables_of<_result_type_provider>, provided_outer_tables_of - >::size::value>; + >::size::value != 0>; }; }; } diff --git a/tests/SelectTest.cpp b/tests/SelectTest.cpp index 7bdf43a5..5ccc94e4 100644 --- a/tests/SelectTest.cpp +++ b/tests/SelectTest.cpp @@ -64,6 +64,11 @@ int main() std::cout << a << ", " << b << ", " << g << std::endl; } + for (const auto& row : db(select(all_of(t), all_of(f)).from(t.join(f).on(t.alpha > f.omega)).where(true))) + { + std::cout << row.alpha << std::endl; + } + auto stat = sqlpp::select().columns(all_of(t)).flags(sqlpp::all).from(t).extra_tables(f,t).where(t.alpha > 0).group_by(t.alpha).order_by(t.gamma.asc()).having(t.gamma).limit(7).offset(19); auto s = dynamic_select(db).dynamic_columns(all_of(t)).dynamic_flags().dynamic_from(t).extra_tables(f,t).dynamic_where().dynamic_group_by(t.alpha).dynamic_order_by().dynamic_having(t.gamma).dynamic_limit().dynamic_offset();