RE: Common attributes in the model

From: Fredrik Liden (flide..ranslate.com)
Date: Wed Jun 20 2007 - 12:08:35 EDT

  • Next message: Øyvind Harboe: "Relationships across databases"

    I think you may not be talking about the same thing?

    Malcolm, we can configure it so the classes extend a specified
    superclass and add basic general functionality. But any attributes that
    are listed in that superclass can they really be persisted with Cayenne?

    That would require some form of mapping of those common attributes to
    DBEntities somewhere? and more complex database generation. How would
    all classes inheriting those attributes know to add those attributes to
    their individual DBEntity or/and add code to the table creation
    statements?

    I'd be interested to know if this is possible too. I have date_created,
    and created_by, date_modified, and modified_by in many tables.

    Thanks,
    Fredrik

    -----Original Message-----
    From: yongbl [mailto:i_yongb..ahoo.com.sg]
    Sent: Wednesday, June 20, 2007 7:37 AM
    To: use..ayenne.apache.org
    Subject: Re: Common attributes in the model

    Hi Malcolm,
       
      After setting the superclass, I tried to generate the database schema.
    But the attributes in the superclass is not reflected in the schema.
      Do I have to manually add to the database the common attributes? If
    so, then settting the superclass didn't offers any time saving since i
    still need to add the common attributes :(
       
      Regards,
      James

    Malcolm Edgar <malcolm.edga..mail.com> wrote:
      No there is not.

    cheers Malcolm

    On 6/20/07, yongbl wrote:
    >
    > Hi Malcolm,
    >
    > Is there a need to create DBEntity and ObjEntity for the superclass?
    >
    > Regards,
    > James
    >

           
    ---------------------------------
     
     Real people. Real questions. Real answers. Share what you know.



    This archive was generated by hypermail 2.0.0 : Wed Jun 20 2007 - 12:09:00 EDT