• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

hibernate 3 retrieve query returns duplicates

 
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can you show us your code?
 
sai kinnera
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
reply
    Bookmark Topic Watch Topic
  • New Topic