]
Steve Ebersole closed HHH-609.
------------------------------
Closing stale resolved issues
Adds substr to PostgreSQL dialect
---------------------------------
Key: HHH-609
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-609
Project: Hibernate Core
Issue Type: Improvement
Components: core
Environment: Hibernate 2/3, PostgreSQL 7.4.x/8.0.x
Reporter: Michael O'Cleirigh
Fix For: 3.1 beta 1
Original Estimate: 1h
Remaining Estimate: 1h
Currently in Hibernate 2/3 its impossible to execute the following HQL when targeting the
PostgreSQL database:
"select substr (a.postalCode, 1, 3) from Address a"
By adding the substring to the PostgreSQL dialect this query works as desired.
For some reason using this variant:
"select substr (postalCode, 1, 3) from Address"
causes all persistent instances from Address to be loaded (as if "from Address"
had been called)
For Hibernate2 the addition to the PostgreSQL dialect is:
registerFunction ("substr",
new StandardSQLFunction (Hibernate.STRING);
For Hibernate3 the addition to the PostgreSQL dialect is:
registerFunction ("substr",
new StandardSQLFunction ("substr", Hibernate.STRING);
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: