cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Kienenberger <>
Subject Re: Some more concrete questions about Cayenne
Date Thu, 19 Jan 2012 14:17:57 GMT
On Thu, Jan 19, 2012 at 8:55 AM, Durchholz, Joachim
<> wrote:
> Delegation would give me more independence from the generated code, at the expense of
some memory usage (which could become relevant since some of the things we do are bulk operations
on hundreds of thousands of objects; some of the operations haven't been split into reasonably-sized
auto-continuing transactions yet).

It's trivial to change the template to generate delegation patterns
instead.   I've done that in a project where either Cayenne or JPA
could be used as the backend.   In fact, I used Cayenne templates to
generate both backends.

The same project also worked with an in-house system where all of the
"authoritative" metadata was stored in a database.   I wrote a simple
extension to the modeler to automatically "import" from the metadata
rather than the xml file, and then resave it to a standard cayenne

> I'm extremely wary of modifying templates. It means I have to revisit them on each and
every Cayenne update to see whether the basic machinery has changed and I need to redo my

The templates are standard velocity templates with a very few number
of cayenne-specific attributes predefined.

I am fairly certain that the templating tasks have only changed once
in the last 8 years -- I did the upgrade -- and when they did change,
full backward compatibility was left in as an option.    I am not
using the 3.x branch yet, but I would expect that Cayenne 1.1
templates created back in 2004 would work just as well today.

Yes, it's always possible that the basic data structure behind the
Cayenne mapping could change, but I don't think that's happened yet,
other than perhaps new additions, which shouldn't affect older models.

View raw message