Re: Why no getPropertyNames?

From: Robert Zeigler (robert..uregumption.com)
Date: Thu Mar 06 2008 - 12:19:47 EST

  • Next message: Mike Kienenberger: "Re: Why no getPropertyNames?"

    All of the meta-data is stored in the obj entity (and the dbentity).
    So, something like:
    obj.getObjEntity().getAttributes(); //return attribute (non-
    relationship properties)
    obj.getObjEntity().getRelationships();//return relationships (1-1, 1-
    many, etc.)

    You can get the property names from there. You can also get the
    corresponding DbAttribute to determine table and column names, joins,
    etc.

    Robert

    On Mar 6, 2008, at 3/610:55 AM , Mary-Anne Wolf wrote:

    > In the DataObject, there is readProperty and writeProperty, but there
    > does not appear to be a method to get the names of the available
    > properties.
    >
    > I could hack around this limitation by creating a custom superclass
    > for
    > my CayenneDataObject instances,
    > but WHY is there no getPropertyNames method? Is there a way to get
    > the
    > names of the properties
    > which I have not figured out?
    >
    > Mary-Anne
    >



    This archive was generated by hypermail 2.0.0 : Thu Mar 06 2008 - 12:20:40 EST