Helper methods - aggregate for expression and SQL without SQL...

2016-06-12 Thread Mark Wardle
Dear all, I'm implementing a new project using Cayenne based on some code currently running in a live application built using WO/EOF/Wonder (see https://github.com/wardle/rsterminology) Migrating to Cayenne has been very straightforward so far. Within Project Wonder, there are a large number of

Re: Helper methods - aggregate for expression and SQL without SQL...

2016-06-16 Thread Mark Wardle
Aggregates.java >> >> For your insert/update rows, I think you'll have to write that yourself. >> If your "data" dictionary/map object uses keys that match your entity's >> attribute names, You can probably loop over they keys and write the values >>

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) { forEach.a

Re: Batch iteration

2016-10-15 Thread Mark Wardle
Sorry… meant to say using Cayenne M4.0.M3… Mark > On 15 Oct 2016, at 20:29, Mark Wardle wrote: > > I’m using ResultBatchIterator like this: > > Consumer forEach = ... > try (ResultBatchIterator iterator = query.batchIterator(context, > batchSize)) { >

Re: Batch iteration

2016-10-16 Thread Mark Wardle
text() : null; > } > > > > On Sat, Oct 15, 2016 at 2:37 PM Mark Wardle wrote: > >> Sorry… meant to say using Cayenne M4.0.M3… >> >> Mark >> >>> On 15 Oct 2016, at 20:29, Mark Wardle wrote: >>> >>> I’m using ResultBatchIterat

Re: Batch iteration

2016-10-17 Thread Mark Wardle
gt;> public static ObjectContext newObjectContext() { >>> ObjectContextFactory factory = CayenneRuntime.getThreadInjector >>> ().getInstance(ObjectContextFactory.class); >>> return (factory != null) ? factory.createContext() : null; >>> } >>> >>

Re: in-memory filter by Expression accessing regular methods

2017-04-15 Thread Mark Wardle
Can't try it as only have phone at the moment but have you tried adding "get" as a prefix to your method declaration? I still find it difficult to not name getters without the get. -- Dr. Mark Wardle Consultant Neurologist, Cardiff, UK (Sent from my mobile) > On 13

Committed snapshot

2017-04-18 Thread Mark Wardle
Is there a simple way of getting the value of a property as committed rather than the current property value? Many thanks, Mark

Re: in-memory filter by Expression accessing regular methods

2017-04-18 Thread Mark Wardle
Glad it worked! Mark -- Dr. Mark Wardle Consultant Neurologist, Cardiff, UK (Sent from my mobile) > On 16 Apr 2017, at 12:13, Musall, Maik wrote: > > Wow, Mark, good guess! > > That's it. Added a get… method around each part of the path's accessed > methods, a

Re: Committed snapshot

2017-04-18 Thread Mark Wardle
Thanks Michael. Looks good - I'll give it a whirl. Mark -- Dr. Mark Wardle Consultant Neurologist, Cardiff, UK (Sent from my mobile) > On 18 Apr 2017, at 15:57, Michael Gentry wrote: > > Hi Mark, > > I haven't done it for a specific property, but I did it for a