-->
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: ResultSet don't init value
PostPosted: Tue Mar 29, 2005 10:53 am 
Regular
Regular

Joined: Thu Feb 24, 2005 2:34 pm
Posts: 80
Hibernate version:3


hi boys,
I don't succeed in understanding a thing, I have a simple chart with a composite-id.
When I do a simple
Code:
Session session = AS400Session.currentSession();
      Query sql = session.createQuery("from CCicliMisureVO as ay where ay.pk.stagcz=? and ay.pk.modecz=? and ay.pk.matecz=? ");
      sql.setString(0, pf.getPfvopk().getStagpf());
      sql.setString(1, pf.getPfvopk().getModepf());
      sql.setString(2, pf.getPfvopk().getMatepf());

/*      sql.setFirstResult(startx);
      sql.setMaxResults(count);*/
      ArrayList list = new ArrayList();
      list = (ArrayList) sql.list();
      CCicliMisureVO vos[] = new CCicliMisureVO[list.size()];
      list.toArray(vos);
      for(int x=0;x<vos.length;x++)
      {
        CCicliMisureVO vo = (CCicliMisureVO)vos[x];
       
        System.out.print(vo.getPk().getStagcz()+" "+vo.getPk().getModecz()+" "+vo.getPk().getMatecz());
       // System.out.print(" "+vo.getMisura().getCdc_misure()+" "+vo.getMisura().getDsc_misure());
        System.out.println(" "+vo.getMa4cz());
       

      }
      session.connection().commit();
 


everything perfectly works, it returns me the 7 rows but all you initialize with the values of the first line that it finds in my db, I don't use any association, thing I can still look
Can you help me please
Devis


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 05, 2005 1:37 pm 
Beginner
Beginner

Joined: Wed Nov 24, 2004 10:54 am
Posts: 48
read the doc on overriding equals and hashCode. I had the same problem.


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.