a little complex sql query returns wrong recordset, and the flush command executes a lot
of queries I don't have execute ...
----------------------------------------------------------------------------------------------------------------------------
Key: HHH-6996
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-6996
Project: Hibernate ORM
Issue Type: Bug
Components: query-sql
Affects Versions: 3.6.8, 3.5.4
Environment: Ubuntu 11.10 - Eclipse Indigo 3.7.x - MySQL 5.1.54-1ubuntu4 - Java
Sun JDK 1.6.0_24 / jdk 1.6.0_30
Testing with "show_sql">true and "format_sql">true
Reporter: Nestor Dubikin
Attachments: testErrorHibernateSQLQuery.rar
I execute a createSQLQuery select with 5 left join, last two over same table to obtain
user_id and user name for 2 users.
I have 2 problems:
Problem 1: sql query executes and in 2 loaded fields in the record the data does not
correspond with database field
Example wrong result with hibernate:
236, S21 - Pdte. Escanear convenio, df_demo, df_demo >>>> wrong retrieved
data >>>> S21 - Pdte. Escanear convenio, S21 - Pdte. Escanear convenio
Example correct result whith jdbc:
214,S16 - Pdte. Borrador Convenio,df_demo,df_demo, >>>> correct retrieved
data >>>> dfag demo,dfag demo
( pleas see attached test app )
Problem 2: I am executing only a sql select, but when tx.commit()s, hibernate¿? fire a set
of deletes and insert that I can understand who is indicating this action.
This actions apparentely does not final effect in database because all deleted records are
inserted newly, but I'm not peaceful with this ...
Please see attached word ( inside the .rar file )
Best regards,
Néstor Dubikin
skype: ndubikin
--
This message is automatically generated by JIRA.
For more information on JIRA, see:
http://www.atlassian.com/software/jira