Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 3028 invoked from network); 31 Mar 2009 16:37:12 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 31 Mar 2009 16:37:12 -0000 Received: (qmail 78711 invoked by uid 500); 31 Mar 2009 16:37:11 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 78691 invoked by uid 500); 31 Mar 2009 16:37:11 -0000 Mailing-List: contact user-java-help@ibatis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user-java@ibatis.apache.org Delivered-To: mailing list user-java@ibatis.apache.org Received: (qmail 78683 invoked by uid 99); 31 Mar 2009 16:37:11 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 31 Mar 2009 16:37:11 +0000 X-ASF-Spam-Status: No, hits=2.4 required=10.0 tests=DNS_FROM_OPENWHOIS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of clamey@localmatters.com designates 216.241.189.144 as permitted sender) Received: from [216.241.189.144] (HELO mailhost01.localmatters.com) (216.241.189.144) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 31 Mar 2009 16:37:05 +0000 Received: from 10.4.0.152 ([10.4.0.152]) by mailhost01.ad.corp.localmatters.com ([10.200.4.32]) with Microsoft Exchange Server HTTP-DAV ; Tue, 31 Mar 2009 16:36:44 +0000 User-Agent: Microsoft-Entourage/11.4.0.080122 Date: Tue, 31 Mar 2009 10:36:43 -0600 Subject: Re: How to Compare database record before UPDATE using iBatis? From: Christopher Lamey To: Message-ID: Thread-Topic: How to Compare database record before UPDATE using iBatis? Thread-Index: AcmyHt/IHqD/6h4SEd68SAAbY5caEQ== In-Reply-To: <536e8800903310625t35015d13l41d2283f815e6ae1@mail.gmail.com> Mime-version: 1.0 Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org On 3/31/09 7:25 AM, "Nicholoz Koka Kiknadze" wrote: > Hm, I usually override equals. Any advantages with hashCode? Just an FYI, if you override equals(), you should almost always override hashcode as well. From the Object.equals Javadoc API: "Note that it is generally necessary to override the hashCode method whenever this method is overridden, so as to maintain the general contract for the hashCode method, which states that equal objects must have equal hash codes." Check out Josh Bloch's "Effective Java" for a detailed explanation. Cheers, Chris