cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike Kienenberger" <mkien...@gmail.com>
Subject Re: DataContext.localObject() on uncommitted objects
Date Wed, 19 Jul 2006 19:15:13 GMT
Hmm.   This sounds far too similar to my own problem.   I'd like to
see if this fixes my problem as well.

Ugh -- apache archive :-(
http://mail-archives.apache.org/mod_mbox/incubator-cayenne-user/200607.mbox/raw/%3c8f985b960607051220q426e433fg563a151d0fde96c9@mail.gmail.com%3e

Objectstyle thread:
http://objectstyle.org/cayenne/lists/cayenne-user/2006/07/0010.html


On 7/19/06, Andrus Adamchik <andrus@objectstyle.org> wrote:
> I can confirm - it's a bug. I just fixed it on 1.2 branch; will
> commit the fix to HEAD shortly.
>
> http://issues.apache.org/cayenne/browse/CAY-601
>
> Andrus
>
>
> On Jul 19, 2006, at 11:55 AM, Øyvind Harboe wrote:
>
> > Is it supported to pass an ObjectId for an uncommitted
> > CayenneDataObject (i.e. where getObjectId().isTemproary()==true) to
> > DataContext.localObject()?
> >
> >
> > The reason I ask, is that I'm struggling with the exception below.
> >
> > The scenario as best as I can tell is:
> >
> > - Create a new CayenneDataObject
> > - Create a child context
> > - Transfer the newly created CayenneObject to the childcontext using
> > DataContext.localObject() (I haven't tried creating the
> > CayenneDataObject in the child)
> > - modify the CayenneDataObject in the child context
> > - commitToParent on the child context
> > - At this point I create a new child datacontext and transfer the same
> > CayenneDataObject to the child using localObject()
> > - At this point the readProperty() on the object causes the
> > exception below
> >
> >
> > org.objectstyle.cayenne.CayenneRuntimeException
> > Temporary id can't be used in RelationshipQuery: <ObjectId:TreatCost,
> > TEMP:000000791D3C010B>
> > unlabeledMessage:     Temporary id can't be used in RelationshipQuery:
> > <ObjectId:TreatCost, TEMP:000000791D3C010B>
> > Stack Trace:
> >
> >    * org.objectstyle.cayenne.query.RelationshipQuery.<init>
> > (RelationshipQuery.java:112)
> >    * org.objectstyle.cayenne.access.DataContextFaults
> > $ToOneFault.doResolveFault(DataContextFaults.java:139)
> >    * org.objectstyle.cayenne.access.DataContextFaults
> > $ToOneFault.resolveFault(DataContextFaults.java:117)
> >    * org.objectstyle.cayenne.CayenneDataObject.readProperty
> > (CayenneDataObject.java:245)
> >
> >
> > --
> > Øyvind Harboe
> > http://www.zylin.com
> >
>
>

Mime
View raw message