Re: unexpected new DataObject in DataContext

From: Mike Kienenberger (mkienen..mail.com)
Date: Tue Oct 11 2005 - 16:36:56 EDT

  • Next message: Jürgen Saar: "Solved: unexpected new DataObject in DataContext"

    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
    >
    >



    This archive was generated by hypermail 2.0.0 : Tue Oct 11 2005 - 16:36:59 EDT