Return-Path: Delivered-To: apmail-ibatis-dev-archive@www.apache.org Received: (qmail 84193 invoked from network); 17 Sep 2009 21:08:51 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 17 Sep 2009 21:08:51 -0000 Received: (qmail 75650 invoked by uid 500); 17 Sep 2009 21:08:51 -0000 Delivered-To: apmail-ibatis-dev-archive@ibatis.apache.org Received: (qmail 75587 invoked by uid 500); 17 Sep 2009 21:08:50 -0000 Mailing-List: contact dev-help@ibatis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ibatis.apache.org Delivered-To: mailing list dev@ibatis.apache.org Received: (qmail 75579 invoked by uid 99); 17 Sep 2009 21:08:50 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 Sep 2009 21:08:50 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [216.243.229.100] (HELO smtp2.a-t-g.com) (216.243.229.100) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 Sep 2009 21:08:39 +0000 Received: from ATGDSMFSM01.a-t-g.com ([216.243.229.107]) by smtp2.a-t-g.com with Microsoft SMTPSVC(6.0.3790.3959); Thu, 17 Sep 2009 16:08:30 -0500 Received: from ATGDSMFSM01.a-t-g.com ([216.243.229.5] helo=ATGDSMFSM01.a-t-g.com) by ASSPCentral; 17 Sep 2009 16:08:30 -0500 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01CA37DA.F9E184CA" Subject: Parameters mapping to same Property (.Net) Date: Thu, 17 Sep 2009 16:08:16 -0500 Message-ID: In-Reply-To: <16178eb10909140656y6b9e19e4t198cb88391654b0a@mail.gmail.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Parameters mapping to same Property (.Net) thread-index: Aco1RC/txZnizwKUSrG2v2pzDn+25QCljK8g References: <16178eb10909140656y6b9e19e4t198cb88391654b0a@mail.gmail.com> From: "James Armstead" To: X-OriginalArrivalTime: 17 Sep 2009 21:08:30.0140 (UTC) FILETIME=[01D237C0:01CA37DB] X-Virus-Checked: Checked by ClamAV on apache.org ------_=_NextPart_001_01CA37DA.F9E184CA Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Why is iBatis built to only allow you to map a single column to a single property? =20 Say you have: =20 =20 The EnteredDt get set right before Save because of a custom hook that has been added in to set the Database time into the EnteredDt before saving, so we want to use the EnteredDt property. Why would iBatis be built to build 2 arrays with the property as the key? Making it impossible to have a 2 columns mapped to the same property because the keys conflict thus the the column array is larger than the property array throwing a ArgumentOutOfRange Exception?=20 =20 Is there a way around this other than checking to see if OriginalEnteredDt is empty and if it is then return EnteredDt? =20 ------_=_NextPart_001_01CA37DA.F9E184CA Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Why is iBatis built to only allow you to map a single = column to a single property?

 

Say you have:

 

<parameter column=3D”EnteredDt” = property=3D”EnteredDt”>

<parameter column=3D”OriginalEnteredDt” = property=3D”EnteredDt”>

 

The EnteredDt get set right before Save because of a = custom hook that has been added in to set the Database time into the EnteredDt = before saving, so we want to use the EnteredDt property. Why would iBatis be = built to build 2 arrays with the property as the key? Making it impossible to = have a 2 columns mapped to the same property because the keys conflict thus the = the column array is larger than the property array throwing a = ArgumentOutOfRange Exception?

 

Is there a way around this other than checking to see if OriginalEnteredDt is empty and if it is then return = EnteredDt?

 

------_=_NextPart_001_01CA37DA.F9E184CA--