[hibernate-issues] [Hibernate-JIRA] Created: (HHH-2577) HQL: "select count(e.collection) from MyEntity e" produces wrong SQL
Fabio Tudone (JIRA)
noreply at atlassian.com
Wed Apr 18 09:10:04 EDT 2007
HQL: "select count(e.collection) from MyEntity e" produces wrong SQL
--------------------------------------------------------------------
Key: HHH-2577
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2577
Project: Hibernate3
Issue Type: Bug
Components: query-hql
Affects Versions: 3.2.3
Environment: Hibernate 3.2.3, DB2/NT UDB 8
Reporter: Fabio Tudone
Attachments: Test.jar
Suppose "A" and "B" are entities and A contains a bag (Collection) "bs" (one-to-many) of B instances. Then the following HQL query:
select count(a.bs) from A a
produces the following DB2 SQL statement:
select
count(.) as col_0_0_
from
A a0_,
B b1_
where
a0_.k = b1_.k
which is not legal.
--
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.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list