Solved: unexpected new DataObject in DataContext

From: Jürgen Saar (jsaa..eb.de)
Date: Wed Oct 12 2005 - 05:39:57 EDT

  • Next message: noban: "WARN EntityResolver: *** Class 'MyTableClass' not found in runtime. Ignoring."

    Thanx ...
    I didn't know that an empty, new created DataObject
    looks like this ...

    The "(temp)" shown from ObjectId pushed me into the wrong direction

    Now I found the bug in one of my libraries,
    where is created one Object too much.

    Mike Kienenberger <mkienen..mail.com> schrieb am 11.10.05 22:37:02:
    >
    > It's not possible to say what you're doing to create the new object,
    > but you could override setPersistanceState() and figure it out.
    > Here's an example, but you'd probably want to expand the error message
    > to be more meaningful to your situation.
    >
    > public void setPersistenceState(int persistenceState)
    > {
    > super.setPersistenceState(persistenceState);
    >
    > if (PersistenceState.NEW == persistenceState) {
    > new Throwable("Object X registered.").printStackTrace();
    > }
    > }
    >
    >
    >
    > On 10/5/05, Jürgen Saar <jsaa..eb.de> wrote:
    > >
    > > Hi,
    > >
    > > within our web-application there is a probleme while updating a dataobject.
    > >
    > > The problem is caused by an empty new object in the DataContext.
    > > In the log-file it looks like:
    > >
    > > {[]<oid: org.jsaar.mware.business.cayenne.land.PsAbtrace (temp): ; state: new>}
    > >
    > > The object I try to change is from same type an seems to be correct,
    > > but this second new object is completely empty
    > > and the additional "(temp)" I've never seen before.
    > >
    > > Has anybody an idea where this object may come from?
    > >
    > > Thanx a lot
    > > --- Jürgen ---
    > > ______________________________________________________________
    > > Verschicken Sie romantische, coole und witzige Bilder per SMS!
    > > Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193
    > >
    > >

    ______________________________________________________________
    Verschicken Sie romantische, coole und witzige Bilder per SMS!
    Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193



    This archive was generated by hypermail 2.0.0 : Wed Oct 12 2005 - 05:40:02 EDT