Re: getter/setters for PKs in generated objects

From: Michael Gentry (blacknex..mail.com)
Date: Tue Jun 05 2007 - 21:44:51 EDT

  • Next message: Malcolm Edgar: "[ann] Click Framework 1.3 released"

    By default, the Modeler doesn't map the PK/FK attributes into the
    ObjEntity (the Java-class portion in the Modeler), but if you map the
    PK/FK attributes into the ObjEntity manually, it should "stick" and
    should be saved in the model (so it won't be lost). Then, when you
    generate your classes, it'll also generate getters/setters for the
    PK/FK values.

    /dev/mrg

    On 6/5/07, Michael Lepine <mikelepin..mail.com> wrote:
    > I am looking into using Cayenne for a new project. I have used it before for
    > new applications but not to integrate with an existing framework which is
    > what I'll be doing on this project. The existing project is a web-based
    > application that has a database back-end with almost 300 tables. The
    > application manages the generation of primary keys when new objects are
    > created. The application currently has a proprietary data access layer with
    > custom objects that I would like to eventually fully replace.
    >
    > My issue/question is related to the generated Java classes. Of course, I can
    > go into each parent class for the generated objects and add getter/setter
    > methods for primary/foreign keys, but is there any way to force the Modeler
    > to generate getter/setters for these fields?
    >
    > Thanks for any help.
    >
    > - Mike
    >



    This archive was generated by hypermail 2.0.0 : Tue Jun 05 2007 - 21:45:15 EDT