| Hi i am new to hibernate
 I have three tables.
 Table1
 Project
 ID
 
 
 POJO
 Project
 Set<Milestone>
 id(int)
 
 
 Table2
 MilestoneType
 code
 
 POJO
 MilestoneType
 set<Milestone>
 code(int)
 
 Table 3
 Milestone
 ID(from Project)
 code(from MilestoneType)
 desc
 
 POJO
 Milestone
 object of Project
 object of MilestoneType
 description(String)
 
 Table1 has one-to-many relation with Table3
 Table2 also has one -to-many relation with Table3
 
 i need to write a criteria from Project to check the desc of Milestone table.
 I tried createAlias("Milestone","Milestone").createAlias("Milestone.MilestoneType","MilestoneAlias");
 
 then i added the restriction
 criteria.add(Restrictions.eq("MilestoneAlias.desc","description"));
 
 but it showed me SQL grammar exception saying "MilestoneAlias12_.desc" invalid identifier
 
 can anyone resolve this..
 
 
 |