Re: readDbProperty

From: Mike Kienenberger (mkienen..laska.net)
Date: Wed Jul 21 2004 - 10:15:39 EDT

  • Next message: Andrus Adamchik: "Re: Invalidate lookup tables cache?"

    Tore Halset <halse..vv.ntnu.no> wrote:
    > I need to read a property from a CayenneDataObject based on a
    > db-attribute. I do not know the obj-attribute. How can I determine the
    > obj-attribute from the db-attribute?

    This worked for my optimistic locking patch around 1.1M3, but I haven't
    needed it since then.

    ObjAttribute objAttr = objEntity.getAttributeForDbAttribute(dbAttribute);

    You can use EntityResolver to get the ObjEntity if you need that as well.

    -Mike



    This archive was generated by hypermail 2.0.0 : Wed Jul 21 2004 - 10:15:12 EDT