Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 97045 invoked from network); 5 May 2009 07:17:35 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 5 May 2009 07:17:35 -0000 Received: (qmail 78525 invoked by uid 500); 5 May 2009 07:17:34 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 78492 invoked by uid 500); 5 May 2009 07:17:33 -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 78478 invoked by uid 99); 5 May 2009 07:17:33 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 May 2009 07:17:33 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [195.4.92.95] (HELO mout5.freenet.de) (195.4.92.95) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 May 2009 07:17:21 +0000 Received: from [195.4.92.12] (helo=2.mx.freenet.de) by mout5.freenet.de with esmtpa (ID exim) (port 25) (Exim 4.69 #89) id 1M1Esi-0006FZ-Hr for user-java@ibatis.apache.org; Tue, 05 May 2009 09:16:00 +0200 Received: from www16.emo.freenet-rz.de ([194.97.107.197]:54849) by 2.mx.freenet.de with esmtpa (ID exim) (port 25) (Exim 4.69 #79) id 1M1Esi-00069u-Fd for user-java@ibatis.apache.org; Tue, 05 May 2009 09:16:00 +0200 Received: from www-data by www16.emo.freenet-rz.de with local (Exim 4.67 1 (Panther_1)) id 1M1Esh-00020P-GW for ; Tue, 05 May 2009 09:15:59 +0200 To: user-java@ibatis.apache.org From: gratler69@freenet.de Subject: Re: RE: Lazy loading when having dynamic table names X-Priority: 3 X-Abuse: 711681949 / 160.110.63.178 User-Agent: freenetMail MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: quoted-printable Message-Id: Date: Tue, 05 May 2009 09:15:59 +0200 X-Virus-Checked: Checked by ClamAV on apache.org Well, it wasn't my idea to do DB schema design like that... But the DB is really big, lots of other applications are accessing it and c= hanging the DB schema is definetely no option, unfortunately! So please let= 's get back to the orignal question now, again. That thing about tokens sounds interesting! Someone else here who can give more info on this possibility? Thanks, so fa= r! ----- original Nachricht -------- Betreff: RE: Lazy loading when having dynamic table names Gesendet: Mo 04 Mai 2009 17:27:10 CEST Von: "meindert" > I don't have the answer, because I haven't had the issue, > but would it be possible to use token replacement like clinton described > last week? > I have no idea of you can replace the tokens runtime for the session > though... >=20 > >=20 >=20 > -----Original Message----- > From: gratler69@freenet.de [mailto:gratler69@freenet.de]=20 > Sent: 04 May 2009 04:04 PM > To: user-java@ibatis.apache.org > Subject: Lazy loading when having dynamic table names >=20 > Hi! >=20 > In our DB schema (that cannot be changed) we got dynamic table names, > depending > on the current company, i.e. there are tables ORDER_100, ORDER_200,... wi= th > ORDER_100 being company 100's ORDER table, etc.=20 >=20 > Now everything is fine, for a single select, as I can pass the current > company > as a parameter and configure query like this: >=20 > >=20 > But what if i want to get ORDER table's related CUSTOMER using lazy > loading? >=20 > Then I will need something like: >=20 > >=20 > with the resultMap of orders looking like this: >=20 > > > > >=20 > And I can see no possibility to pass the 'company' parameter to > getCustomerById > select... > I think of generating sqlmap configuration dynamically, i.e. there would = be > a > get getCustomerById_100, getCustomerById_200, etc. then. But that's poor > and > ugly... >=20 > What would be useful is some global variable that could be set on the > current > session, or something, and one could use within any statement then. >=20 > Do you have a solution to this problem? > Any comments are greatly appreciated! >=20 >=20 >=20 >=20 >=20 > Gratis: Jeden Monat 3 SMS versenden- > Mit freenetMail - Ihrer kostenlose E-Mail-Adresse > http://email.freenet.de/dienste/emailoffice/produktuebersicht/basic/sms/i= nde >=20 > x.html?pid=3D6830 >=20 >=20 > No virus found in this incoming message. > Checked by AVG - www.avg.com=20 > Version: 8.5.287 / Virus Database: 270.12.16/2094 - Release Date: 05/03/0= 9 > 16:51:00 >=20 >=20 --- original Nachricht Ende ---- =0A=0A=0A=0AIst Ihr wunschname@freenet.de noch frei?=0AJetzt pr=FCfen und k= ostenlose E-Mail-Adresse sichern!=0Ahttp://email.freenet.de/dienste/emailof= fice/produktuebersicht/basic/mail/index.html?pid=3D6829=0A