pbDatabase wrote:
Hi,
I am new to hibernate and databases in general. So please excuse the simple request.
I have setup an eclipse project, with the appropriate .hbm and .cfg files. I have a couple of tables that I can successfully query. The problem I am having is using the
join query. I am not sure what query I should have??? I tried a number of variations but I am getting nowhere! Also do I need to update my .hbm files. I am not sure after reading various sites. Anyway, I have listed the simple mysql query below.
Code:
select inventory.title from inventory join store on inventory.ID=store.inventoryId;
Any help would be greatly accepted.
Thanks.
The hibernate problem I am facing is while retrieving the old Person class's objects from the Map. This is happening when I am retrieving a collection of Person Objects.
The collection seems to be detached from the session object. It is the way Quartz handles Hibernate sessions. I am not using Hibernate Sessions explicitly to do any of these operations. I am being safe by going via the Quartz API for everything. I think this is a bit similar to the problem that OSIV(Open Session In View) filter solves for the web apps. I may be wrong.
I am not able to understand why the Session is getting detached. Is there a timeout on the session/transaction object, where can I find more details about how Quartz uses Hibernate? I am loading a whole lot of objects in this program via the Quartz API. I had faced this issue earlier and solved it by using Hibermate.initialize, now that doesn't work either.
I haven't configured a sessionfactory or a transactionmanager etc, I am just using the Quartz API. Is that the issue?
There is a closed Jira issue which is similar to this:
http://jira.atlassian.com/browse/CWD-171 When I look around the web, this seems to be a common problem with the way Quartz handles Hibernate. The common solution seems to be configuring a Spring hibernate interceptor, I tried and failed as I am shamefully out of touch with Hibernate. Any help would be great.