[hibernate-issues] [Hibernate-JIRA] Commented: (EJB-367) Duplicated result in query with Inner join

Gail Badner (JIRA) noreply at atlassian.com
Fri Jun 6 13:56:33 EDT 2008


    [ http://opensource.atlassian.com/projects/hibernate/browse/EJB-367?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_30350 ] 

Gail Badner commented on EJB-367:
---------------------------------

Please attach a runnable test case (Java + mapping) that reproduces this issue.

> Duplicated result in query with Inner join
> ------------------------------------------
>
>                 Key: EJB-367
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/EJB-367
>             Project: Hibernate Entity Manager
>          Issue Type: Bug
>         Environment: Hibernate 3.2, PostgreSql
>            Reporter: rodrigo rosa
>
> The following query returns  m.titulo equals  to comunidade.titulo  when they are diferent in database. It seems that Hibernate repeat the the value for column with same name.
> results = newSession.createSQLQuery("select m.id, m.titulo, m.resumo,m.corpo, m.autor_id, comunidade.titulo, count(v.id) as votos from noticia m  left join voto v on v.noticia_id=m.id  inner join usuario w on w.id=m.autor_id left outer join comunidade on w.comunidade_id=comunidade.id "+filtro+" group by m.id, m.corpo, m.titulo, m.resumo, m.autor_id, comunidade.titulo order by votos desc").list();

-- 
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