Consider this case …
Table T1 --> id, name
Table T2 --> id, name, desc, object_instance_id
These two tables T1 and T2 are not associated …
Only T2’s column object_instance_id is populated with T1.id …
There is no relationship between T1 and T2 in terms of database …
I need something as follows …
Select * from T1, T2 where T1.name=’something’ and T1.id = T2.object_instance_id and T2.name=’<some value>’
Does anyone know how to do this efficiently in terms of hibernate criteria?
Please send me the code if you think this can be done in terms of HibernateCriteria …
Thanks,
Suchandra
|