Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SEEK without WHERE produces excess 1 = 1 predicate #7460

Closed
lukaseder opened this issue May 3, 2018 · 0 comments
Closed

SEEK without WHERE produces excess 1 = 1 predicate #7460

lukaseder opened this issue May 3, 2018 · 0 comments

Comments

@lukaseder
Copy link
Member

When using the SEEK clause on a query that has no WHERE clause, there's an excess 1 = 1 predicate being generated:

assertEquals(
    asList(3, 4),
    create().select(TBook_ID())
            .from(TBook())
            .orderBy(TBook_ID())
            .seek(2)
            .fetch(TBook_ID()));

produces:

select "PUBLIC"."T_BOOK"."ID"
from "PUBLIC"."T_BOOK"
where (
  1 = 1
  and "PUBLIC"."T_BOOK"."ID" > 2
)
order by "PUBLIC"."T_BOOK"."ID"

when it should produce:

select "PUBLIC"."T_BOOK"."ID"
from "PUBLIC"."T_BOOK"
where "PUBLIC"."T_BOOK"."ID" > 2
order by "PUBLIC"."T_BOOK"."ID"
@lukaseder lukaseder added this to the Version 3.11.0 milestone May 3, 2018
@lukaseder lukaseder changed the title SEEK produces excess 1 = 1 predicate SEEK without WHERE produces excess 1 = 1 predicate May 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant