[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-1587?page=c...
]
Diego Plentz resolved HHH-1587.
-------------------------------
Assignee: Diego Plentz
Resolution: Cannot Reproduce
Etienne, I created a project to reproduce your problem(using hibernate 3.2.6, postgre 8.3
and PostgreSQLDialect), but it works as expected. Create a testcase if you still having
this problem.
public void find(){
getSession().createQuery("from Person p where p.active = true").list();
}
Generates:
select
person0_.id as id0_,
person0_.active as active0_
from
Person person0_
where
person0_.active=true
'true' and 'false' as keywords for PostgreSQL
dialect
-----------------------------------------------------
Key: HHH-1587
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-1587
Project: Hibernate3
Issue Type: Improvement
Reporter: Etienne Bernard
Assignee: Diego Plentz
Priority: Minor
I'm using the PostgreSQL dialect with hibernate 3.1.
I tried to add a ' where="active=true" ' restriction on my collection
mapping.
Unfortunately, it was incorrectly interpreted as a column name by the query parser :
FROM es.vodafone.tienda.model.Phone AS p JOIN p.activePhonePacks AS pp
WHERE p.active=true
where rewritten as :
select phone0_.id as col_0_0_, activephon1_.id as col_1_0_ from phone phone0_ inner join
phonepack activephon1_ on phone0_.id=activephon1_.phone and
activephon1_.active=activephon1_.true where phone0_.active=true
The solution seems to register "true" and "false" as keywords in the
PostgreSQL dialect :
registerKeyword("true");
registerKeyword("false");
Thanks.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira