• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

hibernate 3 retrieve query returns duplicates

 
sai kinnera
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am retrieving a result set based on a certain criteria and working fine with hibernate2. After migration to Hibernate3(DTD changed), the same query now returns duplicates. Like: if you have to get 100 different records for the query, I am getting 100 but all of them are same rows (one row repeatred 100 times). I have an orderby clause in the query and this one record is rightly picked, I mean is supposed to be the first record to be returned.
Any help is appreciated.
Thanks,
Sai
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you show us your code?
 
sai kinnera
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Paul,
The SQL generated from my query executed well from SQL navigator and returned the right results. Worked fine too on Oracle8i and Hibernate2. Now wehave Oracle 10G & hibernate3. I tried putting lazy="false" at class level.It uses a composite-id and I tried with a single id temporarily. Nothing worked. I wonder if there are any properties to set in cfg.xml other than OracleDialect,JTATransManager etc,

Thanks,
Sai
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic