Re: Testing for Valid Objects

From: Mike Kienenberger (mkienen..laska.net)
Date: Fri Aug 06 2004 - 17:00:18 EDT

  • Next message: Robert Zeigler: "No DataMap found for query exception???"

    =?iso-8859-1?Q? J=FCrgen=20Saar ?= <jsaa..eb.de> wrote:
    > I use the actual version of cayenne
    > in difference to 1.0 where silently an empty DataObject was returned
    > reading the empty relation-object now a CayenneException is thrown.

    Thanks for the reminder. I thought this problem sounded familiar.

    Take a look at this from Cayenne Release Notes 1.1 B2:

    > - DataObject.resolveFault() will now throw an exception if the underlying
    DB row does not exist
    > follow this link for further discussion:
    > http://objectstyle.org/cayenne/lists/cayenne-user/2004/07/0124.html

    According to this, 1.1B2 started throwing Exceptions in addition to marking
    the object transient.

    Also covered in
    http://objectstyle.org/jira/secure/ViewIssue.jspa?key=CAY-132, so you may
    want to vote for this issue if it's important to you and you don't like the
    workaround.

    Sounds like it's a bug that'll be fixed after 1.1 (so that null is returned
    instead).

    -Mike



    This archive was generated by hypermail 2.0.0 : Fri Aug 06 2004 - 16:59:30 EDT