Re: "Can't build a query for temporary id" after upgrade from 1.2B2 to 1.2RC2

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Wed Jul 05 2006 - 18:16:11 EDT

  • Next message: Borut Bolčin: "oid as PK"

    > I'm guessing that the new recursive algorithm is somehow interfering
    > with my own graph-chunk registration methods.

    This is possible... If you have an isolated test case, please put it
    in Jira. "localObject" method is trying to be everything for
    everybody. We may need to split it into individual cases at some point.

    Andrus

    On Jul 5, 2006, at 6:01 PM, Mike Kienenberger wrote:

    > For what it's worth, the change in behavior happened between B2 and
    > B3. Versions B3, RC1, and RC2 all generate the same error.
    >
    > The only thing in the release notes for B3 that looks relevent is
    >
    > CAY-542 Re-registered objects lose their relationships
    >
    > I'm guessing that the new recursive algorithm is somehow interfering
    > with my own graph-chunk registration methods.
    >
    >
    > On 7/5/06, Mike Kienenberger <mkienen..mail.com> wrote:
    >> Well, I've been unable to track down exactly how this is happening.
    >> Somehow, when my objects are unserialized and reattached to their
    >> datacontexts on the following request, some of them are being changed
    >> from NEW to HOLLOW in calls to localObjects(). Under B2, the
    >> objects never get attached via localObjects (localObjects isn't
    >> called) but they do with RC2.
    >>
    >> I've spent a couple hours on this now, so I guess I'll just stick
    >> with
    >> B2 for the time being.
    >>
    >> I wish I could figure out where RC2 causes the logic to work
    >> differently, but I can't think of any easy way to determine this.
    >>
    >> On 7/5/06, Mike Kienenberger <mkienen..mail.com> wrote:
    >> > Well, stepping through it in the debugger shows the state of the
    >> > object as new at this point with B2 but hollow with RC2. Guess I
    >> > need to track down what caused the persistent state change.
    >> >
    >> >
    >> > On 7/5/06, Andrus Adamchik <andru..bjectstyle.org> wrote:
    >> > > Looks like you have a HOLLOW object with a temporary ID?
    >> Strange...
    >> > >
    >> > > Andrus
    >> > >
    >> > >
    >> > > On Jul 5, 2006, at 3:20 PM, Mike Kienenberger wrote:
    >> > >
    >> > > > I'm not entirely certain what's changed between 1.2B2 and
    >> 1.2RC2, but
    >> > > > I'm now getting this error when I upgrade.
    >> > > >
    >> > > > This is reading a property a newly-created data object.
    >> > > >
    >> > > > CayenneDataObject.readProperty returned null in B2 rather than
    >> > > > throwing an exception.
    >> > > >
    >> > > >
    >> > > > Caused by: org.objectstyle.cayenne.CayenneRuntimeException:
    >> [v.1.2RC2
    >> > > > June 23 2006] Can't build a query for temporary id:
    >> > > > <ObjectId:EasementDocument, TEMP:0000000F51E40161>
    >> > > > at
    >> > > >
    >> org.objectstyle.cayenne.query.ObjectIdQuery.createReplacementQuery
    >> > > > (ObjectIdQuery.java:151)
    >> > > > at
    >> org.objectstyle.cayenne.query.IndirectQuery.getReplacementQuery
    >> > > > (IndirectQuery.java:111)
    >> > > > at org.objectstyle.cayenne.query.IndirectQuery.route
    >> > > > (IndirectQuery.java:94)
    >> > > > at
    >> org.objectstyle.cayenne.access.DataDomainQueryAction.runQuery
    >> > > > (DataDomainQueryAction.java:346)
    >> > > > at
    >> org.objectstyle.cayenne.access.DataDomainQueryAction.access$000
    >> > > > (DataDomainQueryAction.java:96)
    >> > > > at org.objectstyle.cayenne.access.DataDomainQueryAction
    >> $1.transform
    >> > > > (DataDomainQueryAction.java:327)
    >> > > > at
    >> org.objectstyle.cayenne.access.DataDomain.runInTransaction
    >> > > > (DataDomain.java:856)
    >> > > > at
    >> > > >
    >> org.objectstyle.cayenne.access.DataDomainQueryAction.runQueryInTransa
    >> c
    >> > > > tion(DataDomainQueryAction.java:324)
    >> > > > at
    >> > > >
    >> org.objectstyle.cayenne.access.DataDomainQueryAction.interceptOIDQuer
    >> y
    >> > > > (DataDomainQueryAction.java:172)
    >> > > > at
    >> org.objectstyle.cayenne.access.DataDomainQueryAction.execute
    >> > > > (DataDomainQueryAction.java:142)
    >> > > > at org.objectstyle.cayenne.access.DataDomain.onQuery
    >> > > > (DataDomain.java:766)
    >> > > > at
    >> org.objectstyle.cayenne.access.ObjectStore.resolveHollow
    >> > > > (ObjectStore.java:945)
    >> > > > at
    >> org.objectstyle.cayenne.access.DataContext.prepareForAccess
    >> > > > (DataContext.java:1842)
    >> > > > at org.objectstyle.cayenne.CayenneDataObject.readProperty
    >> > > > (CayenneDataObject.java:238)
    >> > > > at
    >> > > >
    >> com.gvea.eng_work_mgmt.entity.cayenne.generated._EasementDocumentImpl
    >> .
    >> > > > getEasementType(_EasementDocumentImpl.java:309)
    >> > > > ... 72 more



    This archive was generated by hypermail 2.0.0 : Wed Jul 05 2006 - 18:16:39 EDT