Re: Batch iteration

2016-10-15 Thread John Huss
I would use a peer context. You can create a peer context like this if you runtime has been bound to the current thread using CayenneRuntime.bindThreadInjector(runtime.getInjector()) public static ObjectContext newObjectContext() { ObjectContextFactory factory = CayenneRuntime.getThreadInjector

Batch iteration

2016-10-15 Thread Mark Wardle
I’m using ResultBatchIterator like this: Consumer forEach = ... try (ResultBatchIterator iterator = query.batchIterator(context, batchSize)) { for(List batch : iterator) { for (T c : batch) {