getPrimaryKeys ?

From: Arnaud Garcia (arnaud.garci..im.hcuge.ch)
Date: Tue Jan 31 2006 - 12:25:06 EST

  • Next message: Andrus Adamchik: "Re: getPrimaryKeys ?"

    Hello,

    Is there a way to get all the primary keys attributes of a
    CayenneDataObject to compare it with another one?

    What I need to do:
    I have another xml datasource which sends some objects, and I need to
    compare these objects before adding them to another object (one to many
    relationship) ... so I need to compare them with their primary keys.

    if anObject.getPrimaryKeys().equal(maybeTheSameObject.getPrimaryKeys()
    then
        // do nothing
    else
    containerObject.addTo(anObject)

    => If I don't test the object before adding it, I have a violation
    constrainst ...

    thanks for help

    arnaud



    This archive was generated by hypermail 2.0.0 : Tue Jan 31 2006 - 12:24:28 EST