[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-2266?page=all ]
Manuel Mall updated HHH-2266:
-----------------------------
Attachment: model.zip
I have attached a ZIP file containing two Java files, one being the entity class and the
other being the composite id class for the entity.
The query in question is simply:
select count(e) from CertificateTypeField e
The Hibernate emitted SQL is:
select count((certificat0_.code, certificat0_.name)) as col_0_0_ from
CertificateTypeFields certificat0_
Hope this helps
Incorrect SQL emitted for EJB query involving COUNT()
-----------------------------------------------------
Key: HHH-2266
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-2266
Project: Hibernate3
Type: Bug
Components: core
Versions: 3.2.0.ga
Environment: Hibernate 3.2 / MySQL 4.1.xx
Reporter: Manuel Mall
Attachments: 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....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira