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'
|