cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Wardle <>
Subject Helper methods - aggregate for expression and SQL without SQL...
Date Sun, 12 Jun 2016 20:53:34 GMT
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

Migrating to Cayenne has been very straightforward so far.

Within Project Wonder, there are a large number of utility methods to make
it easy to deal with qualifiers (expressions) and perform database agnostic
batch operations without using SQL.

ERXEOControlUtilities.objectCountWithQualifier(ec, entityName, qual);

which takes a qualifier (essentially a Cayenne expression) and an entity
and performs a count.

ERXEOAccessUtilities.insertRow(ec, entityName, data);

which takes a context, entity name and dictionary (a map) and inserts the
values without having to deal with entities (a bit like a DataRow I think
in Cayenne?).

For example, we have
ERXEOAccessUtilities.updateRowsDescribedByQualifier(ec, entityName, qual,
which takes a context, entity name, qualifier and a dictionary of data and
updates rows based on that data.

Are there equivalent utility methods within Cayenne please? I have found
SQLTemplate but, it looks as if I'd have to hand-tune the expression to
update and get embroiled in creating to logic to understand the DbEntity
and its properties in order to map a map. It feels as if I'm probably
fighting the framework and so normally that suggests I'm approaching it

Advice for a WO-er appreciated.

Best wishes,


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message