Read the rules before posting!
http://www.hibernate.org/ForumMailingli ... AskForHelp
[b]Hibernate version:2.1.3
[b]Mapping documents:-
[b]Code between sessionFactory.openSession() and session.close():
list1 = HibernateSessionFactory.currentSession().find("select g.groupid, g.groupdescription from Mygroup g");
i = HibernateSessionFactory.currentSession().iterate("select g.groupid, g.groupdescription from Mygroup g");
i= list1.iterator();
while (i.hasNext())
{
//Object o= i.next();
Mygroup mg = (Mygroup) i.next();
System.out.println(mg.getGroupid());
}
[b]Full stack trace of any exception that occurs:
java.lang.ClassCastException
at myclient.GroupClient.main(GroupClient.java:43)
hello
[b]Name and version of the database you are using:sqlserver
How to access the field and how to display it...