<cgen> Ant task and makepairs attribute

From: Erik Hatcher (eri..hatchersolutions.com)
Date: Wed Apr 27 2005 - 09:32:26 EDT

  • Next message: Mike Kienenberger: "Re: Cayenne vs EOF functionality"

    Admittedly still a Cayenne (and ORM) newbie, I'm working out how to fit
    Cayenne into my project. I've been happily using the <cgen> task.
    I've just modeled some inheritance, though, and now need to add the
    setPersistenceState() trick to my main model subclasses. What I've
    done is move these empty classes into my maintained codebase to add
    this code, and will certainly be adding other business methods there in
    the near future too.

    The <cgen> task only has the makepairs attribute though, which
    generates the superclass/subclass combination or a class that both
    combined. What I'd rather have is just the generation of the
    superclasses. For now I'm dealing with this by doing this after
    <cgen>:

         <delete>
           <fileset dir="${build.dir}/gen" excludes="**/_*.java"/>
         </delete>

    I'm curious what others using <cgen> do when the subclasses need to be
    modified, and whether modifying <cgen> to be friendlier to this type of
    situation is of interest or if there is a better way to do what I'm
    doing.

    Thanks,
            Erik



    This archive was generated by hypermail 2.0.0 : Wed Apr 27 2005 - 09:32:47 EDT