Originally posted by Abhi Shetty:
Hibernate version:2.0
My business rules are complex.
we are joining 2 or more tables, then putting the resultset into a temporary table. then performing some operations on the temporary table -- we are again joining the resultset from the above operations to other tables.
-- currently we are usings SPs for this purpose.
How can i acheive this in Hibernate?
Depending on the complexity, it might be possible to avoid a temporary table by using table expressions (in DB2). Though it is called something else in other RDBMS, iam sure every RDBMS supports that. So if that would work, then all can be done in one SQL. With right indexes, it will work fine as well. Then you can use Hibernate the usual way without having to worry about temporary tables.