RE: ObjectStore help ...

From: Gentry, Michael \(Contractor\) ("Gentry,)
Date: Thu May 26 2005 - 09:11:20 EDT

  • Next message: Andrus Adamchik: "RE: ObjectStore help ..."

    I've done my fix in 1.1, so yes, it affects it. (same for the
    optimistic logging issue) I'm not working on 1.2 yet (don't have it
    checked out).

    Now, if Andrus wants to release an update to 1.1, that's a different
    story ... :-)

    /dev/mrg

    -----Original Message-----
    From: Cris Daniluk [mailto:cris.danilu..mail.com]
    Sent: Thursday, May 26, 2005 9:08 AM
    To: cayenne-deve..bjectstyle.org
    Subject: Re: ObjectStore help ...

    Is this something that also affects 1.1, and if so, is this something
    that warrants fixing before 1.2 comes out?

    On 5/25/05, Andrus Adamchik <andru..bjectstyle.org> wrote:
    > I think this is the best thing we can do here.
    >
    > Andrus
    >
    > > I modified nullSafeEquals to look like:
    > >
    > > public static boolean nullSafeEquals(Object obj1, Object obj2)
    > > {
    > > if (obj1 == null && obj2 == null)
    > > return true;
    > > else if (obj1 != null)
    > > {
    > > // Arrays must be handled differently, since equals() does
    > > // an == and ignores equivalence
    > > if (obj1.getClass().isArray() == false) {
    > > return obj1.equals(obj2);
    > > }
    > > else { // It is an array, so compare the contents
    > > EqualsBuilder builder = new EqualsBuilder();
    > > builder.append(obj1, obj2);
    > > return builder.isEquals();
    > > }
    > > }
    > > else
    > > return false;
    > > }
    > >
    > >
    > > Any thoughts on this? It is currently working in my test
    application
    > > (no more redundant UPDATEs). I tried to put the common case
    (non-binary
    > > byte arrays) first and only do my stuff last ...
    > >
    > > Thanks,
    > >
    > > /dev/mrg
    > >
    > >
    > >
    > > -----Original Message-----
    > > From: Cris Daniluk [mailto:cris.danilu..mail.com]
    > > Sent: Wednesday, May 25, 2005 3:32 PM
    > > To: cayenne-deve..bjectstyle.org
    > > Subject: Re: ObjectStore help ...
    > >
    > >
    > >> I guess we need to change Util.nullSafeEquals() to make it similar
    to
    > >> ObjectId.equals that does "deep" comparison of primitive arrays.
    The
    > >> question is how to do it without too much overhead as
    "nullSafeEquals"
    > > is
    > >> used all over the place.
    > >>
    > >> Andrus
    > >>
    > > nullSafeEquals is used all over the place, but in general, primitive
    > > arrays are not. Shouldn't be a big impact, should it?
    > >
    > > Cris
    >
    >
    >
    >



    This archive was generated by hypermail 2.0.0 : Thu May 26 2005 - 09:11:24 EDT