Re: Can't delete in Cayenne 3M5 :(

From: Robert Zeigler (robert.zeigle..oxanemy.com)
Date: Wed Apr 08 2009 - 14:00:13 EDT

  • Next message: Robert Zeigler: "Re: EJBQL and parameters"

    Well... I don't use Click, but I do use deleteObject all the time with
    no issues.
    It looks like you're running into an API difference. The 3.0 API was
    relaxed from 2.0. In 2.0, deleteObject took an
    org.apache.cayenne.Persistent. In 3.0, it takes any java.lang.Object.

    See: http://cayenne.apache.org/doc/api/org/apache/cayenne/access/DataContext.html#deleteObject(java.lang.Object)
      (3.0)
    and: http://cayenne.apache.org/doc20/api/cayenne/org/apache/cayenne/access/DataContext.html#deleteObject(org.apache.cayenne.Persistent)
      (2.0)

    So, Click was compiled against 2.0 API, and you're supplying the 3.0
    runtime, I presume?

    Robert

    On Apr 8, 2009, at 4/812:48 PM , Joseph Schmidt wrote:

    >
    > Trying to delete object entities with Cayenne 3M5 doesn't seem to
    > work anymore - it used to work with 2.0 :(.
    >
    > I'm getting the error message:
    > java.lang.NoSuchMethodError:
    > org.apache.cayenne.access.DataContext.deleteObject(Lorg/apache/
    > cayenne/Persistent;)V
    >
    > Is there something different in 3.0 about deleting objects since 2.0?
    > I was just using:
    > http://incubator.apache.org/click/docs/extras-api/org/apache/click/extras/cayenne/CayenneTemplate.html#deleteObject(org.apache.cayenne.DataObject)
    >
    > as before. That method from CayenneTemplate just calls
    > DataContext#deleteObject(Object).
    >
    > thanks,
    > Joseph.
    >
    >
    >
    >



    This archive was generated by hypermail 2.0.0 : Wed Apr 08 2009 - 14:00:50 EDT