I'm doing a Criteria.list() query and it throws this exception:
Code:
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 C2_12_ appears twice!
Code:
/* Formatted on 2007/09/26 16:36 (Formatter Plus v4.8.7) */
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. How can I avoid this?