Hi,
the select limit is database specific.
For exemple MS SQL Server can only limit size off resultset, no "paging"
functions aviable, so real limit query has no effect.
With MySQL and PB API, you can try this way :


Query query = QueryFactory.newQuery(clazz, criteria);
if (useLimit) {
        query.setStartAtIndex(offset+1);
        query.setEndAtIndex(offset+limit+1);
}
Collection collection = broker.getCollectionByQuery(query);

regards
                
"Smail Louahchi" <[EMAIL PROTECTED]> wrote:

> Hi,
> 
> how can i limit the result in OJB.
> 
> Smail Louahchi
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

_________________________________________________________




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to