Re: Common attributes in the model

From: Malcolm Edgar (malcolm.edga..mail.com)
Date: Tue Jun 19 2007 - 19:40:27 EDT

  • Next message: Alexander Lamb (dev): "Re: Duplicates in to-many relationships"

    No there is not.

    cheers Malcolm

    On 6/20/07, yongbl <i_yongb..ahoo.com.sg> wrote:
    >
    > Hi Malcolm,
    >
    > Is there a need to create DBEntity and ObjEntity for the superclass?
    >
    > Regards,
    > James
    >
    > Malcolm Edgar <malcolm.edga..mail.com> wrote:
    > Hi James,
    >
    > Yes you can. In the modeler, you define a common "Custom Superclass" under
    > the DataMap "Entity Defaults". Make sure you custom superclass extends
    > DataObject, and add your common attributes. You generated classes will
    > then
    > extend your common superclass.
    >
    > Make sure your DB Entities support these attributes.
    >
    > regards Malcolm Edgar
    >
    > On 6/18/07, yongbl wrote:
    > >
    > > Hi,
    > >
    > > I am new to Cayenne. In many of the models that I am using, there are
    > > common attributes like created date, modified date, created by, etc. Is
    > > there a right way to add the common attributes, other than manually
    > adding
    > > the common attributes in the models?
    > >
    > > It seems that I can't create a base model with the common attributes,
    > > and extend the rest of the models from the base model, right?
    > >
    > > Regards,
    > > James
    > >
    > >
    > > ---------------------------------
    > > Yahoo! Movies - Search movie info and celeb profiles and photos.
    >
    >
    >
    > ---------------------------------
    >
    > Real people. Real questions. Real answers. Share what you know.



    This archive was generated by hypermail 2.0.0 : Tue Jun 19 2007 - 19:40:52 EDT