On Tue, Dec 6, 2011 at 1:22 PM, Pascal Robert <prob...@macti.ca> wrote:

> Hi John,
>
> Enum Attributes is also supported by EOF, have a look at the javaEnum from
> Wonder.
>
> Also, do you think the Project Wonder Veogen templates could be rewritten
> to make calls to Cayenne instead of EOF? For example, having the
> createEntityName method to create a new "EO"? Might be a solution from
> people who wants to migrate from EOF to Cayenne while not needing to
> rewrite all of their EOF calls.


Yes, you can get very close to a drop in replacement with a few wrapper
classes around Cayenne.  In my experimenting I was able to migrate a couple
small apps with just a handful of manual changes after creating some
wrappers and a compatible EO template.  The useful parts of that work are
in the ERCayenne framework and example:

- EOModel converter
- Entity template (almost completely implementing the content of the
WonderEntity template)
- Entity superclass adding KVC to Cayenne
- Key class for replacing ERXKey

My manual changes were to change declarations of type EOQualifier to
Expression like

EOQualifier qual = ...
Expression qual = ....

And to change .and(qualifier) to .andExp(qualifier)

Reply via email to