Skip to content

Fix derived queries with boolean literals. #983

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

Closed
wants to merge 5 commits into from

Conversation

schauder
Copy link
Contributor

@schauder schauder commented May 26, 2021

IsTrue and IsFalse queries no longer use a literal in the query, but a bind parameter.
This allows Spring Data JDBC or the JDBC driver to convert the passed boolean value to whatever is required in the database.

For Oracle converter where added to support storing and loading booleans as NUMBER(1,0) where 0 is false and everything else is true.

Closes #908

@schauder schauder requested a review from mp911de May 26, 2021 07:59
schauder added a commit that referenced this pull request May 31, 2021
`IsTrue` and `IsFalse` queries no longer use a literal in the query, but a bind parameter.
This allows Spring Data JDBC or the JDBC driver to convert the passed boolean value to whatever is required in the database.

For Oracle converter where added to support storing and loading booleans as NUMBER(1,0) where 0 is false and everything else is true.

Closes #908
Original pull request #983
@schauder schauder force-pushed the issue/908-boolean-for-derived-queries branch from 46826bc to 1a581b2 Compare May 31, 2021 10:25
schauder added 5 commits June 2, 2021 12:47
`IsTrue` and `IsFalse` queries no longer use a literal in the query, but a bind parameter.
This allows Spring Data JDBC or the JDBC driver to convert the passed boolean value to whatever is required in the database.

For Oracle converter where added to support storing and loading booleans as NUMBER(1,0) where 0 is false and everything else is true.

Closes #908
Original pull request #983
@schauder schauder force-pushed the issue/908-boolean-for-derived-queries branch from 1a581b2 to b32beaa Compare June 2, 2021 10:48
@schauder
Copy link
Contributor Author

schauder commented Jun 2, 2021

Rebased, added test to demonstrate interaction of converters registered by Dialect and by the user.
This needed a minor change to AbstractJdbcConfiguration.

Added and cleaned up documentation, which was spread across two places.

mp911de pushed a commit that referenced this pull request Jun 10, 2021
`IsTrue` and `IsFalse` queries no longer use a literal in the query, but a bind parameter.
This allows Spring Data JDBC or the JDBC driver to convert the passed boolean value to whatever is required in the database.

For Oracle converter where added to support storing and loading booleans as NUMBER(1,0) where 0 is false and everything else is true.

Closes #908
Original pull request #983
mp911de pushed a commit that referenced this pull request Jun 10, 2021
See #908
Original pull request #983
@mp911de mp911de added the type: bug A general bug label Jun 10, 2021
@mp911de mp911de added this to the 2.3 M1 (2021.1.0) milestone Jun 10, 2021
@mp911de
Copy link
Member

mp911de commented Jun 10, 2021

That's merged now.

@mp911de mp911de closed this Jun 10, 2021
@mp911de mp911de deleted the issue/908-boolean-for-derived-queries branch June 10, 2021 12:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A general bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MSSQL bit wrongly mapped to boolean value TRUE
2 participants