Re: Interface, abstract classes and Cayenne

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Sun Apr 18 2004 - 13:39:39 EDT

  • Next message: Craig Jones: "Recall object by it's PK? (e.g. w/Lucene)"

    On Apr 18, 2004, at 1:18 PM, Andrus Adamchik wrote:

    >
    >> 2. Is it possible to map object attributes to the same table? For
    >> example:
    >
    > Yes, it is possible. Separation of the mapping metadata into
    > ObjEntities and DbEntities (basically descriptors for object and
    > database layers, loosely tied together) makes it possible. However I
    > don't understand your example - you have Address and ContactEntity
    > that has Address as a property, both mapped to the same table?

    Ok, now that I had a few more cups of coffee, I think I see what you
    are talking about :-) You have a "wide" table that has all columns for
    Address and also some other columns that map to some other properties
    in Contact, and you want to map it as a composition, so that in Java
    Address appears as a separate class. Is this what you mean?

    It still should be possible to do that. Though the fact that both
    Contact and its dependent Address share the same DB row makes me
    nervous :-)

    Andrus



    This archive was generated by hypermail 2.0.0 : Sun Apr 18 2004 - 13:39:44 EDT