-->
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.  [ 1 post ] 
Author Message
 Post subject: Query list error
PostPosted: Mon Jun 22, 2009 9:41 am 
Newbie

Joined: Sun Dec 21, 2008 10:14 am
Posts: 2
Hi all,

I have the following code:

public List<PropAtt> getAllPropositionAttributes() throws HibernateException {
List< PropAtt> result = null;
Query query = getSession().createQuery("from PropAtt propAttribute");
result = (List< PropAtt >) query.list();
}

result object is a list of records, but all the record are the same. For example
result[0] = 200;Color;Red (are internally to PropAtt object)
result[0] = 200;Color;Red (are internally to PropAtt object)
result[0] = 200;Color;Red (are internally to PropAtt object)

The Select generated show the following:
200 color blue
200 size big
200 height 11

Can you help me?

Thanks
Danilo


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

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.