Re: Queries on non-committed objects

From: Todd O'Bryan (toddobrya..ac.com)
Date: Sun Feb 05 2006 - 18:15:22 EST

  • Next message: Andrus Adamchik: "Re: Queries on non-committed objects"

    More confusion. I got the DataMap correct, but then it yelled at me
    for trying to perform a query on a NEW data object, so I'm back where
    I was to begin with, but with more chance of succeeding eventually.

    I tried to work around the problem by faking the query by going
    through the elements I'd added to my DataObject by hand.
    Unfortunately, it appears that things are getting double-added for
    some reason. I'm using the Cayenne-generated addToData() method to
    add 8 pieces of data to a DataObject. But when I called getData(), I
    get a List with 16 elements. Similarly, when I go through the List to
    pull out the elements I care about, I discover two exact copies (down
    to oids) of the same object. Any idea what's going on? None of this
    has been written to the database yet. Does Cayenne do double-entry
    accounting for some reason?

    Todd

    On Feb 5, 2006, at 4:17 PM, Todd O'Bryan wrote:

    > I actually checked that! Of course, I saw the db-relationship and
    > missed the fact that the obj-relationship wasn't there. I've been
    > having problems keeping my ObjEntities and DbEntities synchronized.
    > Somehow my Java class had the set and getQuestion() methods, but
    > the DataMap wasn't right.
    >
    > Thanks for the help!
    > Todd
    >
    > On Feb 5, 2006, at 3:57 PM, Andrus Adamchik wrote:
    >
    >>
    >> On Feb 5, 2006, at 3:40 PM, Todd O'Bryan wrote:
    >>
    >>> Caused by: org.objectstyle.cayenne.exp.ExpressionException: [v.
    >>> 1.2M10 January 5 2006] Can't resolve path component:
    >>> [ObQuestionDatum.question].
    >>
    >> That's what it is - your entity ObQuestionDatum doesn't have any
    >> attribute or relationship called "question". Doublecheck that you
    >> have the right version of the DataMap deployed in Tomcat.
    >>
    >> Andrus
    >>
    >



    This archive was generated by hypermail 2.0.0 : Sun Feb 05 2006 - 18:15:38 EST