Hibernate are removing part of my query

Description

The bug is present in 4.2.7 and 4.2.13

We have an SQL query in JPQL:

select t from JavaClass t WHERE 1=1 AND ([a few parameters in this format arameter]) AND ()

The point is that the query is an string (typed one) and before createQuery is full, but the hibernate log is showing it without the last AND:

select t from JavaClass t WHERE 1=1 AND ([a few parameters in this format arameter])

So, why is cutting it?

Environment

Tomcat 7 servlet 3.0 + Postgresql + JPA 2.0 + hibernate 4.2.x

Activity

Show:
Brett Meyer
June 28, 2014, 2:34 AM

Hi , can you attach a test case that demonstrates what you're seeing?

Fran Ferri
June 30, 2014, 6:30 PM

I'm posting sensible info in the example queries, for this I'm restricting visibility of the comments to the Hibernate registered users.

Brett Meyer
June 30, 2014, 6:36 PM
Edited

, are you literally using the following?

If so, do the following instead:

Note the ":" chars missing from the front.

Fran Ferri
July 1, 2014, 4:24 PM

Everything is fixed in my part, a problem in a for because the variables, thanks for the attention Brett.
Really many thanks.

Fran.

Assignee

Unassigned

Reporter

Fran Ferri

Fix versions

None

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

Priority

Blocker
Configure