The SQL query is as follows,
select s1.*
from Sample1 s1,Sample2 s2 where
s1.field1=s2.field4 and
s2.field2='XXYYZZ'
Table Structure
- The table Sample1 has only three fields ( field1, field2, field3 )
- The table Sample2 has three fields ( field4, field5, field6 )
And the Bean Names are
Sample1Bean, Sample2Bean
I want the data only from the Sample1 only, (field1, field2, field3). How can I do this using Hibernate without HQL and Using Criteria class?