Hi Thomas,

you would use a fetch spec for that where you can set a limit.

EOFetchSpecification fs = …
fs.setFetchLimit(10);
NSArray<MaintenanceJob> doubleJobs = ec.objectsWithFetchSpecification(fs);


jw


Am 27.05.2013 um 11:59 schrieb Thomas Grass (01SoftwareSolutions) 
<off...@01softwaresolutions.eu>:

> Hello WO-Coders,
> 
> I fetch objects with special bindings like the following example:
> 
> [...]
> NSMutableDictionary<String, Object> bindings = new 
> NSMutableDictionary<String, Object>();
>       if(selectedJob.description()!=null) 
> bindings.setObjectForKey(selectedJob.description(), "description");
>       if(selectedJob.validSystem()!=null) 
> bindings.setObjectForKey(selectedJob.validSystem(), "validSystem");
>       if(selectedJob.component()!=null) 
> bindings.setObjectForKey(selectedJob.component(), "component");
>       if(selectedJob.subComponent()!=null) 
> bindings.setObjectForKey(selectedJob.subComponent(), "subComponent");
>       NSArray<MaintenanceJob> doubleJobs = 
> MaintenanceJob.fetchForDoubleCheck(session.defaultEditingContext(), bindings);
> […]
> 
> Is there a way to tell the fetch-Method the max number of objects to be 
> fetched? For example: 10 Objects?
> 
> Thomas
> 


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to