[hibernate-issues] [Hibernate-JIRA] Created: (HHH-2865) Criteria generated SQL query has duplicated column names

Juan Ignacio Sánchez (JIRA) noreply at atlassian.com
Wed Sep 26 13:43:57 EDT 2007


Criteria generated SQL query has duplicated column names
--------------------------------------------------------

                 Key: HHH-2865
                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2865
             Project: Hibernate3
          Issue Type: Bug
          Components: query-criteria
    Affects Versions: 3.2.5
         Environment: Hibernate 3.2.5, Oracle
            Reporter: Juan Ignacio Sánchez


I'm doing a Criteria.list() query and it throws this exception:

INFO LongType:182 - could not read column value from result set: C2_12_; Fallo al convertir a representación interna
(internal representation conversion failure).

So I looked at the generated query, and saw C2_12_ appears twice.

SELECT this_.c_tarea_id AS c1_2_10_, this_.d_comentario AS d2_2_10_,
       this_.f_alta AS f3_2_10_, this_.f_hecho AS f4_2_10_,
       this_.f_plazo AS f5_2_10_, this_.c_mgestionado_modelo AS c7_2_10_,
...
       estado5_.d_nombre AS d4_0_1_, opciones6_.c_tarea_id AS c1_12_,
       [b]opcs1_.c_mgestionado_id AS c2_12_[/b], opcs1_.c_transicion_id AS c3_12_,
       opcs1_.c_mgestionado_id AS c1_3_2_, opcs1_.c_transicion_id AS c2_3_2_,

...
rolespermi10_.c_mgestionado_id AS c1_12_,
       [b]rolespermi10_.c_transicion_id AS c2_12_[/b], rol11_.c_rol AS c3_12_,
       rol11_.c_rol AS c1_26_5_, rol11_.d_rol AS d2_26_5_,
...
WHERE ups2_.c_usuario IN (?) AND this_.f_hecho IS NULL 


When Hibernate extracts query results to objects it will fail because 'C2_12_' refers to different data types.

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