Hibernate Criteria Query uses inline values insted of prepared statements params for some values

Description

When I use criteria api and e.g. try to do equal against path expression and Integer number I got query that renders to e.g where val = 1, instead of val = ?

This affects performance, because disallow to use prepared statements cache.

This behaviour occurs only for some types, e.g. dates uses prepared statements params.

Environment

None

Activity

Show:
rsmoguraN
September 17, 2010, 3:05 PM

Address to see if attached application will be used is http://localhost:8080/hibernate-bugs/bugs/3

Steve Ebersole
September 17, 2010, 3:07 PM

This is not a bug. If you want to use a parameter, then define a parameter via the CriteriaBuilder

Assignee

Unassigned

Reporter

rsmoguraN

Fix versions

None

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Affects versions

Priority

Minor
Configure