I have 3 Tables - Lease Account, Lease, Transaction. Each Lease Account has N Leases, each Lease has N Transactions. I am allowed to do only 1 query to the database - Select * from Lease Account, to fetch all this data into Java as N Lease Account objects - each Lease Account object containing a of Lease objects - each Lease containing a of Transaction objects.
Can somebody please guide me on how to write the one to many mapping (hbm.xml) for this scenario in Hibernate(3.2) ?
Thanks.