Hi All,
am new to hibernate , am writing applications in java and i have started using hibernate ,
can i do the following query using sqlquery ( where am using mysql)
Code:
select m.operator,s.scode,a.OCCASIONTYPE ,count(*) from msg_info m,shortcode s,operator op,account a where m.scode_id=s.id and m.operator=op.operator and m.accid=a.id and m.operator in ('SABAFON','mobi') and s.scode in ('4646','4050') and a.occasiontype in ('wedding','anniversary')
group by m.operator,s.scode,a.OCCASIONTYPE;
( by the the way the above tables joins 4 tables).
i have asked one of my friends and she said u have to do it using HQL with criteria , can any one convert it to HQL query .. PLZ help me am new to hibernate