-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: How to display records
PostPosted: Thu Feb 24, 2005 8:38 am 
Newbie

Joined: Wed Feb 23, 2005 9:00 am
Posts: 8
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...


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 24, 2005 9:03 am 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
Please read the documentation, this is clearly explained.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.