DataContext.localObjects() for modified objects

From: Gili (cowwo..bs.darktech.org)
Date: Tue Sep 20 2005 - 01:03:05 EDT

  • Next message: Tomas Jucius: "How to do these two tasks properly in cayenne?"

    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 : Tue Sep 20 2005 - 01:03:06 EDT