[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-2266) Incorrect SQL emitted for EJB query involving COUNT()
Ruben Paulo Martins Trancoso (JIRA)
noreply at atlassian.com
Thu Sep 13 12:07:14 EDT 2007
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-2266?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_28090 ]
Ruben Paulo Martins Trancoso commented on HHH-2266:
---------------------------------------------------
workaround:
user select count(*) or select count(someField)
> Incorrect SQL emitted for EJB query involving COUNT()
> -----------------------------------------------------
>
> Key: HHH-2266
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2266
> Project: Hibernate3
> Issue Type: Bug
> Components: core
> Affects Versions: 3.2.0.ga
> Environment: Hibernate 3.2 / MySQL 4.1.xx
> Reporter: Manuel Mall
> Attachments: hibbug.zip, model.zip
>
>
> If you have an entity with a composite id and query it like:
> select count(e) from Entity e
> the emitted SQL looks like
> SELECT COUNT(e.id1, e.id2) FROM Entity
> However, this is at least according to MySQL invalid SQL as the COUNT function can have only one argument.
--
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