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

SQL/JPA 2.3.1 with PostgreSQL wrong Escape #98

Closed
thackel opened this issue Feb 10, 2012 · 7 comments
Closed

SQL/JPA 2.3.1 with PostgreSQL wrong Escape #98

thackel opened this issue Feb 10, 2012 · 7 comments

Comments

@thackel
Copy link

@thackel thackel commented Feb 10, 2012

2.3.1 introduced some new functionality regarding escaping.
This breaks queries for Postgresql 8.4.x/9.0.x.

So

EntityPathBase.someStringField.containsIgnoreCase(searchString)

produces SQL like:

select * from FOO foo where lower(foo.bar like ? escape '')

This does not execute within PostgreSQL, it needs double backslashes.

@timowest
Copy link
Member

@timowest timowest commented Feb 10, 2012

Which JPA provider are you using?

Loading

@thackel
Copy link
Author

@thackel thackel commented Feb 10, 2012

Hibernate 4.1

Loading

timowest added a commit that referenced this issue Feb 11, 2012
@timowest
Copy link
Member

@timowest timowest commented Feb 11, 2012

I changed the default escape to '!' and made the escape char configurable via a constructor parameter.

Could you test that the change works for you? I made a snapshot release 2.3.1.BUILD-SNAPSHOT to http://source.mysema.com/maven2/snapshots/

Loading

@thackel
Copy link
Author

@thackel thackel commented Feb 11, 2012

I will test it on monday morning, thanks for your quick reaction.

Loading

@thackel
Copy link
Author

@thackel thackel commented Feb 13, 2012

When using 2.3.1.BUILD-SNAPSHOT its working.
Thanks have a nice week.

Loading

@thackel thackel closed this Feb 13, 2012
@timowest timowest reopened this Feb 13, 2012
@timowest
Copy link
Member

@timowest timowest commented Feb 13, 2012

I'll close this when it's released

Loading

@timowest
Copy link
Member

@timowest timowest commented Feb 19, 2012

released in 2.3.2

Loading

@timowest timowest closed this Feb 19, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants