File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Object Relational Mapping and the fly likes hibernate with two schemas Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Object Relational Mapping
Reply Bookmark "hibernate with two schemas" Watch "hibernate with two schemas" New topic
Author

hibernate with two schemas

chiranjeevi gunturu
Ranch Hand

Joined: Mar 02, 2007
Posts: 55
hi all,
I have a problem with hiberante query.i have two schemas in my database A,B and i have two hibernate queries with me. i have to fire the first query on a table of schema A. Based on the result that i got ,i have to fire the second query on a table of schema B.

Is it necessary to have two sessions for this .if so please tell me how to use two sessions?

Thank you,
chiranjeevi
Chandima Janakantha
Greenhorn

Joined: Aug 31, 2006
Posts: 6
You should be able to do this in the same session. after executing the first query use
session.flush(); to load the results for the query.
 
 
subject: hibernate with two schemas
 
Threads others viewed
getPrimaryKeys() method of DatabaseMetaData
How exactly synonyms work in hibernate
reverse engineering /w Middlegen across multiple schemas
when we update in hibernate will it always fire select query before updating
Using JDO with an existing DB schema
MyEclipse, The Clear Choice