RE: takeValuesFromDictionary: equvalent

From: JR Ruggentaler (j..pv.com)
Date: Fri Aug 16 2002 - 17:54:58 EDT

  • Next message: Andrus: "RE: takeValuesFromDictionary: equvalent"

    Sorry I was trying to refer to a CayenneDataObject subclass. If my
    CayenneDataObject has a relationship to another CayenneDataObject what
    should the key and value be for the relationship be in my Map instance that
    I am using in props.putAll(map)? The relationship name and an instance of
    the related CayenneDataObject? What about to many relationships a List
    containing instances of the related CayenneDataObject?

    J.R.

    -----Original Message-----
    From: Andrus [mailto:andru..bjectstyle.org]
    Sent: Friday, August 16, 2002 4:34 PM
    To: JR Ruggentaler; Cayenne-User (E-mail)
    Subject: Re: takeValuesFromDictionary: equvalent

    At 04:24 PM 8/16/2002 -0500, JR Ruggentaler wrote:
    >Does Cayenne support updating a ObjEntity from a class that implements the
    >Map interface?

    I am not sure I understand the question. Do you mean ObjEntity (as a
    collection of metadata) or a CayenneDataObject - a superclass of your
    persistent objects?

    For the later case, in subclass you can do it like that:

    public MyDataObject extends CayenneDataObject {
        public void updateValues(Map map) {
            props.putAll(map);
        }
    }

    Andrus



    This archive was generated by hypermail 2.0.0 : Fri Aug 16 2002 - 17:54:29 EDT