0

My models are as follows

class A{
   int id;
   String name;
}

class B{
   int id;
   String name;
   @ManyToOne(optional = false)
   A a;
}

class C{
   int id;
   int name;
   @ManyToOne(optional = false)
   B b;
}

Now I want to get the result from table/class C group by class A

I have written so far

Criteria criteria = session.getCurrentSession().createCriteria(
                C.class);
criteria. (Group by A); // i dont know how to do it

return criteria.list();

I don't know how to put the group by Class A

So how to do this??

LynAs
  • 6,407
  • 14
  • 48
  • 83

0 Answers0