[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Object is not (yet) associated to a database container?



On Sun, 04 Feb 2001, Andreas Monitzer wrote:
> I've created some objects from a database object using
> database().createObject(...). Now, if I want to access database() or
> container() inside one of these objects, I get the following exception:

> 
> java.lang.RuntimeException: Object is not (yet) associated to a database container.
> 	at org.ozoneDB.OzoneObject.container(OzoneObject.java:54)
> ...
> 
> But their object creation time is over, they are even read from the
> database. Why is there no database container?

> They're addressed from a Vector of proxies.
> 
> It's built that way:
> 
> Application: db.createObject(firstObject)
> 			\-> firstObject: database().createObject(secondObject) (1 item)
> 							\-> secondObject (about 60 items)
> 
> By looking at the XML-dump of the database, I noticed that firstObject is
> stored within each secondObject (-> 60 times), but there should only be a
> proxy of it (I stored the return value of database().createObject() into a
> Vector), on the other side, firstObject itself isn't stored by name (but the
> id is always the same)...

> 
> I also noticed that secondObject is executed within the app and not the
> database, so something is seriously wrong here. But I don't know what, I did
> nothing unusual!