Re: DataContext.localObjects() for modified objects

From: Mike Kienenberger (mkienen..mail.com)
Date: Fri Sep 23 2005 - 13:48:22 EDT

  • Next message: Cris Daniluk: "Re: Reconnecting serialized DataObjects"

    Thanks. This slipped through the cracks.
    I've tried to document what was said in email about using localObjects
    on MODIFIED objects in CAY-380

    http://objectstyle.org/jira/secure/ViewIssue.jspa?key=CAY-380

    On 9/20/05, Gili <cowwo..bs.darktech.org> wrote:
    > Hi,
    >
    > I ran into a few problems using DataContext.localObjects(). These
    > issues were brought up on the mailing list in the past.
    >
    > 1) If an attribute setter is invoked where the new value is equal to the
    > old value, Cayenne marks the object as MODIFIED even though no change
    > occured. It does not even attempt to tackle the simplest of use-cases.
    > Ideally I'd expect it to use equals() to compare the two values but even
    > a == style comparison would be sufficient (and cheap) to add add this time.
    >
    > 2) DataContext.localObjects() does not work on MODIFIED objects, as
    > discussed here:
    > http://www.objectstyle.org/cayenne/lists/cayenne-devel/2005/01/0020.html
    >
    > It looks like the commiters agreed to modify the behavior of
    > localObjects() to work for modified objects but no JIRA issue was ever
    > opened against this and it was not discussed or fixed since January
    > 2005. Should I open a formal JIRA issue against this?
    >
    > There are workarounds for the above problems but it requires a lot of
    > extra work on the user's part. In fact, the only reason I'm even using
    > localObjects() in the first place is as a workaround for
    > http://permalink.gmane.org/gmane.comp.java.cayenne.devel/2493 and this
    > is quickly becoming a workaround for workarounds :(
    >
    > I would appreciate your advice and if you can address some of the
    > aforementioned issues it would be appreciated as well.
    >
    > Thanks,
    > Gili
    > --
    > http://www.desktopbeautifier.com/
    >



    This archive was generated by hypermail 2.0.0 : Fri Sep 23 2005 - 13:48:24 EDT