hello when I used sql query in hibernate (ie hql) I got following error: student is not mapped. [select stud.vStudentName from student as stud]
here is table name in mysql and following is function of select query.
public static void querySubject(Session session) { String sql_query="select stud.vStudentName from student as stud"; Query query1=session.createQuery(sql_query);
for(Iterator it=query1.iterate();it.hasNext();)
{
Object[] row = (Object[]) it.next();
System.out.println("Subject Name:"+row[0]);
}
return;
}