-->
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: Problem with Query interface
PostPosted: Fri Mar 19, 2004 4:23 pm 
Beginner
Beginner

Joined: Mon Mar 08, 2004 5:22 pm
Posts: 35
String findAuctionInfo =
"from Person as person where person.AUCTID = :auctionId";

Query query = sess.createQuery(findAuctionInfo);
query.setString("auctionId", auctionId);// some id
List list = query.list(); // I checked this line in debug mode.


I have 500 people in database for this id with FNAME and LNAME.
But my list has all 500 Person objects with "Dorothy", "Advins".

This is the first record.
FNAME = "Dorothy" LNAME = "Advins"

-------------------------------------------

I ran the same query SQL tools which returns different names,
but in the LIST [returned by Query Interface] has the same record many times.


Here is the generated query :
select prtdirview0_.AUCTID as AUCTID, prtdirview0_.FAX as FAX,
prtdirview0_.PHONE as PHONE, prtdirview0_.PSEMLADDR as PSEMLADDR,
prtdirview0_.PSDEPTDESC as PSDEPTDESC, prtdirview0_.PRTFNAME as PRTFNAME,
prtdirview0_.PRTLNAME as PRTLNAME, prtdirview0_.PRTFLAG as PRTFLAG,
prtdirview0_.PRTEMPST as PRTEMPST
from PRTDIRVIEW prtdirview0_ where prtdirview0_.AUCTID='AAA'


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 24, 2004 6:52 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
some broken getter setter

_________________
Emmanuel


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.