[jboss-jira] [JBoss JIRA] (AS7-4135) Count query on classes mapped as EmbeddedId with multiple Id's fail to execute
Scott Marlow (JIRA)
jira-events at lists.jboss.org
Mon Mar 12 10:10:48 EDT 2012
[ https://issues.jboss.org/browse/AS7-4135?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12675973#comment-12675973 ]
Scott Marlow commented on AS7-4135:
-----------------------------------
I believe that Hibernate bugs should be reported in https://hibernate.onjira.com/browse/HHH. The AS7 JPA/Hibernate jira category is for JPA issues that are not Hibernate issues (e.g. handling of container managed persistence context).
For discussing issues like this, try opening a [discussion forum|https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2279] thread next time.
> Count query on classes mapped as EmbeddedId with multiple Id's fail to execute
> -------------------------------------------------------------------------------
>
> Key: AS7-4135
> URL: https://issues.jboss.org/browse/AS7-4135
> Project: Application Server 7
> Issue Type: Bug
> Components: JPA / Hibernate
> Affects Versions: 7.1.1.Final
> Environment: Verified on MySQL and MariaDB
> Reporter: Ståle Pedersen
> Assignee: Scott Marlow
> Priority: Critical
>
> When doing a count on a class mapped as EmbeddedId with multiple Id's the generated sql will fail on several db's (tested on MySQL/MariaDB) since hibernate generate a count sql containing all the id's.
> Hibernate creates a different (correct) sql on classes mapped with IdClass and multiple Id's.
> A simple test that verify the difference between the two:
> https://github.com/stalep/hibernate-orm/commit/54911765de7981ec9a2318fc9928be68ff37bab3
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list