hi every one..
i did one thing and guess what .. the code worked with limit.. and that
suggests that the following code in Base*Peer do somtihng wrong with
Criteria fro LIMIT
if (criteria.getSelectColumns().size() == 0)
{
addSelectColumns ( criteria );
}
coz when criteria.getSelectColumns().size() != 0 the code run fine
as i did this
Vector v = (Vector)BusinessPeer.doSelect(crit);
System.out.println(crit.toString());
System.out.println(v.size());
crit.setLimit(2);
crit.setOffset(4);
v = (Vector)BusinessPeer.doSelect(crit);
System.out.println(crit.toString());
System.out.println(v.size());
and this code outputs correct value in next execution..:O
and btw... when i do this
crit.addSelectColumn(BusinessPeer.BUSINESSID);
it raises an exception :O... what if i only want to get only
BusinessID's filled in the Vector for Data objects???
please help me in this . Thanks in Advance...
rEgards
Hamza
-----Original Message-----
From: Hamza Rana
Sent: Friday, January 04, 2002 3:48 PM
To: Trubine (E-mail)
Subject: Trouble with LIMIT in CRITERIA, any solution ???
Hi ,
the result return after calling doSelect(Criteria ) has no impact when i
apply setOffset() and setLimit() to its criteria. Does ne one knwo ne
work out to it?
here is the code i m using
Business myBiz = new Business();
Criteria crit= new Criteria();
crit.setLimit(2);
crit.setOffset(2);
try{
Vector v = (Vector)BusinessPeer.doSelect(crit);
System.out.println(v.size());
}
and its printing 4..:O
please help me out in this problem. although when i call crit.toString()
it gives
Current Query SQL (may not be complete or applicable): SELECT FROM
LIMIT 2, 2
Thanks in advance....
regards
Hamza
--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>