Criteria.prototype.limit >= 1.1.0
Purpose
Limit the amount of records to get
Syntax
Criteria#limit
(
Numberamount
);
Parameters
amount
- The amount of records to get
Examples
Set a limit
// Get an instance of the "Page" model
var Page = Model.get('Page');
// Calling "find" on that model without arguments returns a criteria
var criteria = Page.find();
// If we only want 10 records, we do it like this:
criteria.limit(10);
Comments