-->
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: HELP with loading object
PostPosted: Fri Aug 10, 2007 2:13 pm 
Newbie

Joined: Fri Aug 10, 2007 2:07 pm
Posts: 1
Hibernate version: hibernate-3.2.4

Name and version of the database you are using: mysql

Hi, i have this code:

Code:
Session session = HibernateUtil.getSessionFactory().getCurrentSession();

        session.beginTransaction();

        List   s = session.createQuery("from Schedule").list();
       
        session.getTransaction().commit();
       
       
       
        for (int i = 0; i < s.size(); i++) {
            Schedule xx = (Schedule) s.get(i); //HERROR HERE
       
            System.out.println("End: " + ss.getEndTime() +
                               " Start: " + ss.getStartTime());
        }


The error is in Schedule xx = (Schedule) s.get(i); any idea why this donĀ“t work? the list s have the values, the cicle work fine, but Schedule xx = (Schedule) s.get(i); dont work!!!

Any Help please!


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 13, 2007 7:53 am 
Senior
Senior

Joined: Tue May 10, 2005 9:00 am
Posts: 125
Please provide:
* Mapping documents
* Full stack trace of error
* The generated SQL (show_sql=true)


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.