SQL/JPA 2.3.1 with PostgreSQL wrong Escape #98

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

Comments

Projects
None yet
2 participants
@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

This comment has been minimized.

Show comment
Hide comment
@timowest

timowest Feb 10, 2012

Member

Which JPA provider are you using?

Member

timowest commented Feb 10, 2012

Which JPA provider are you using?

@thackel

This comment has been minimized.

Show comment
Hide comment
@thackel

thackel Feb 10, 2012

Hibernate 4.1

thackel commented Feb 10, 2012

Hibernate 4.1

timowest added a commit that referenced this issue Feb 11, 2012

@timowest

This comment has been minimized.

Show comment
Hide comment
@timowest

timowest Feb 11, 2012

Member

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/

Member

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/

@thackel

This comment has been minimized.

Show comment
Hide comment
@thackel

thackel Feb 11, 2012

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

thackel commented Feb 11, 2012

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

@thackel

This comment has been minimized.

Show comment
Hide comment
@thackel

thackel Feb 13, 2012

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

thackel commented Feb 13, 2012

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

@thackel thackel closed this Feb 13, 2012

@timowest timowest reopened this Feb 13, 2012

@timowest

This comment has been minimized.

Show comment
Hide comment
@timowest

timowest Feb 13, 2012

Member

I'll close this when it's released

Member

timowest commented Feb 13, 2012

I'll close this when it's released

@timowest

This comment has been minimized.

Show comment
Hide comment
@timowest

timowest Feb 19, 2012

Member

released in 2.3.2

Member

timowest commented Feb 19, 2012

released in 2.3.2

@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