DaWickedRebel
Programmer
Hi
I am relatively new to hibernate in that I have never done anything more complex than simple object mappings. I know have a more complex situation and don't see the clear way to proceed. Any advice would be greatly appreciated.
I have an Object that is mapped to a specific table. The mapping file indicates this relationship. To determine which objects to retrieve, I need to use a table that is beyond the scope of the mapping. A mock-up of the query is:\
How does one accomplish such a task? As a semi-newb, I know I must be missing something. Thanks again for any and all advice.
I am relatively new to hibernate in that I have never done anything more complex than simple object mappings. I know have a more complex situation and don't see the clear way to proceed. Any advice would be greatly appreciated.
I have an Object that is mapped to a specific table. The mapping file indicates this relationship. To determine which objects to retrieve, I need to use a table that is beyond the scope of the mapping. A mock-up of the query is:\
Code:
session.createQuery("from Object c where c.myCode in (select sub_code from another_table v where v.field1 = :myCriteria1 and v.field2 = :myCriteria2)")
How does one accomplish such a task? As a semi-newb, I know I must be missing something. Thanks again for any and all advice.