You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cayenne.apache.org by Arnaud Garcia <ar...@imagemed-87.com> on 2011/12/20 13:19:15 UTC

No object is registered in context with Id ?

Hi all,
I have this error that I don't understand ? (see below), what does it means
?

remark: My SXDBPatient Cayenne object has a pk attribute (key) and also an
attribute wich is id

thanks for help,

Arnaud

org.apache.cayenne.CayenneRuntimeException: [v.3.0.2 Jun 11 2011 09:31:18]
No object is registered in context with Id <ObjectId:SXDBPatient,
TEMP:00007136158C010D>
    at
org.apache.cayenne.access.ObjectStore.registerDiff(ObjectStore.java:190)
    at
org.apache.cayenne.access.ObjectStore.nodePropertyChanged(ObjectStore.java:1090)
    at
org.apache.cayenne.util.ObjectContextGraphAction.handleSimplePropertyChange(ObjectContextGraphAction.java:83)
    at
org.apache.cayenne.util.ObjectContextGraphAction.handlePropertyChange(ObjectContextGraphAction.java:67)
    at
org.apache.cayenne.access.DataContext.propertyChanged(DataContext.java:1506)
    at
org.apache.cayenne.CayenneDataObject.writeProperty(CayenneDataObject.java:244)
    at com.systemx.db.model.auto._SXDBPatient.setId(_SXDBPatient.java:42)

Re: No object is registered in context with Id ?

Posted by Aristedes Maniatis <ar...@maniatis.org>.
My guess is that you are mixing up the context you created this new object in, and the one you are trying to commit it to. A bit hard to tell without any code.

Ari


On 20/12/11 11:19 PM, Arnaud Garcia wrote:
> Hi all,
> I have this error that I don't understand ? (see below), what does it means
> ?
>
> remark: My SXDBPatient Cayenne object has a pk attribute (key) and also an
> attribute wich is id
>
> thanks for help,
>
> Arnaud
>
> org.apache.cayenne.CayenneRuntimeException: [v.3.0.2 Jun 11 2011 09:31:18]
> No object is registered in context with Id<ObjectId:SXDBPatient,
> TEMP:00007136158C010D>
>      at
> org.apache.cayenne.access.ObjectStore.registerDiff(ObjectStore.java:190)
>      at
> org.apache.cayenne.access.ObjectStore.nodePropertyChanged(ObjectStore.java:1090)
>      at
> org.apache.cayenne.util.ObjectContextGraphAction.handleSimplePropertyChange(ObjectContextGraphAction.java:83)
>      at
> org.apache.cayenne.util.ObjectContextGraphAction.handlePropertyChange(ObjectContextGraphAction.java:67)
>      at
> org.apache.cayenne.access.DataContext.propertyChanged(DataContext.java:1506)
>      at
> org.apache.cayenne.CayenneDataObject.writeProperty(CayenneDataObject.java:244)
>      at com.systemx.db.model.auto._SXDBPatient.setId(_SXDBPatient.java:42)
>

-- 
-------------------------->
Aristedes Maniatis
GPG fingerprint CBFB 84B4 738D 4E87 5E5C  5EFA EF6A 7D2E 3E49 102A