[hibernate-issues] [Hibernate-JIRA] Created: (HSEARCH-337) Search return the same row multiple times on Select

Santhosh Kumaran (JIRA) noreply at atlassian.com
Wed Jan 21 07:21:39 EST 2009


Search return the same row multiple times on Select
---------------------------------------------------

                 Key: HSEARCH-337
                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-337
             Project: Hibernate Search
          Issue Type: Bug
         Environment: Hibernate
            Reporter: Santhosh Kumaran


I have a table in the following pattern on MySQL 5.1

Table1
Key1 int
Key2 int
field1 tinyint
field2 tinyint
field3 tinyint

I have the sql query like
"SELECT {table1Entity.*} FROM TABLE1 table1 where Key1=?"

This query will satify for 3 rows and has to get me the 3 filtered rows.

and the code like this

SQLQuery sqlQuery = session.createSQLQuery(query);
sqlQuery.setInteger(0, 5001);
sqlQuery = sqlQuery.addEntity("table1Entity", Table1Entity.class);
List entityList = sqlQuery.list();

The list contain 3 entity objects, but 3 copies of the first row. ( not all 3 rows). First row coming 3 times instead of 2nd and 3rd row values.

Please let me know, is it a bug or not?

- SANSSAN

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