coldbox-modules / cborm

The ColdBox ORM enhancements for ColdFusion ORM & Hibernate. Make ORM not suck!
https://coldbox-orm.ortusbooks.com/
8 stars 17 forks source link

🐛 FIX: Workaround Hibernate 5.3+ gotchas in exists() #48

Closed michaelborn closed 2 years ago

michaelborn commented 2 years ago

Positional parameter syntax changed in Hibernate 5.3, and the old syntax is no longer supported. For best compatibility across Hibernate versions, simply use named parameters.

Resolves this error message:

org.hibernate.QueryException: Legacy-style query parameters (`?`) are no longer supported;
use JPA-style ordinal parameters (e.g., `?1`) instead :
select count( id ) from Category where id = ? [select count( id ) from Category where id = ?]

Screenshot of failing exists test in CBORM test suite