Hibernate Problem Fixed
I mentioned in a previous post that Hibernate confused me into posting a query for help on their forum. No one helped me, but, as mentioned in another post just a little earlier today, I'm awesome and fixed the problem.
I had asked the question after a few days of chasing the problem on my own. I worked on my beans, my mapping files, and even tugged and pulled on the SQL query that I was trying to use to load the collection. I even asked co-workers for aid, and none of them had better solutions.
So I posted the question. I continued trying things, and posted things noticed during that, too.
After another day of trying, I set to debug Hibernate to see if there was a clue to my problem in the library.
I found it.
Deep in their code, the last thing done with the query I was trying to run was to get the results from the database. This was successful, giving me a glimmer of hope that at least my beans, mappings, and query were correct. I noticed also that this was indeed the last thing it did...get the results from the database. The chain of activity just returned and returned and returned and got to the point where it threw my exception.
The problem: the results of the query were NEVER REMEMBERED!
That's right, the collection was retrieved and then abandoned.
I added about four or five lines of code (more with wrapping, but that doesn't count), and the problem was solved. I ran the code with a few different tests, and found the bit I needed to do to make the collection remember this snapshot (at least, to make it work...it may be wrong still).
I published my findings, forwarded them to the interested parties that I had worked with on the problem, and set about completing the task that was put off for a week due to the bug in the library.
No one has made a mention on the forum yet.