From: <leg...@at...> - 2003-06-14 09:55:07
|
Message: The following issue has been closed. Resolver: Gavin King Date: Sat, 14 Jun 2003 4:54 AM The trouble here is that "true" is not really standard SQL. I know Postgres recognizes this, but Hibernate's Dialect system doesn't yet try and abstract these kind of details. For now, use the workaround you discovered. The parser of the where attribute is pretty braindead, but capable of handling _most_ use cases. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-134 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-134 Summary: the "where" attribute in collection mapping generates incorrect sql Type: Bug Status: Closed Priority: Major Resolution: WON'T FIX Project: Hibernate2 Components: core Versions: 2.0 final Assignee: Gavin King Reporter: Antoni Reus Created: Fri, 13 Jun 2003 6:47 AM Updated: Sat, 14 Jun 2003 4:54 AM Environment: RedHat Linux 7.2, JBoss 3.2.1, J2SDK 1.4.1_02, PostgreSQL 7.3.2 Description: I have a mapping with the following set: .... <set name="fillsPublicats" order-by="data desc" inverse="true" lazy="true" cascade="all" where="publicat = true" > <jcs-cache usage="read-write"/> <key column="pare_id" /> <one-to-many class="org.ibit.foros.model.Missatge"/> </set> .... When the Collection gets initialized it generates the query with this where clause: WHERE FO_MI0_.pare_id=? and FO_MI0_.publicat = FO_MI0_.true ^^^^^^^^ ORDER BY FO_MI0_.data desc; that throws a JDBCException while the expected would be: WHERE FO_MI0_.pare_id=? and FO_MI0_.publicat = true ORDER BY FO_MI0_.data desc; --------------------------------------------------------------------- JIRA INFORMATION: 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/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |