Help coderanch get a
new server
by contributing to the fundraiser
  • 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

Inconsistent Hibernate query results

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm using Hibernate 2.1.8 and am having the following problem:

I am getting different results for the same HQL query even though nothing has changed in the database. For example, object A has ten instances of object B. Often, my query gives me back the ten B objects, but just as often it returns an empty list. Nothing is being changed in the database (no updates, inserts or deletes) and the problem occurs across different invocations of my application. So, for instance, at Time 1 I may run the app and get back the ten B objects (the correct result), at Times 2 and 3 I may get back an empty list (incorrect) and at Time 4 I may get back the correct result. The correct and incorrect behavior occurs seemingly at random, across different invocations of the app.

Can anyone give me a clue as to what might be going on here?

Thanks,
Matt
 
Matt Futterman
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please disregard this topic. The problem turned out to be in my application.
 
Rototillers convert rich soil into dirt. Please note that this tiny ad is not a rototiller:
We need your help - Coderanch server fundraiser
https://coderanch.com/t/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic