Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 95859 invoked from network); 18 Jun 2008 14:18:29 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 18 Jun 2008 14:18:29 -0000 Received: (qmail 93300 invoked by uid 500); 18 Jun 2008 14:18:23 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 93288 invoked by uid 500); 18 Jun 2008 14:18:23 -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 93272 invoked by uid 99); 18 Jun 2008 14:18:22 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Jun 2008 07:18:22 -0700 X-ASF-Spam-Status: No, hits=2.6 required=10.0 tests=DNS_FROM_OPENWHOIS,SPF_HELO_PASS,SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Jun 2008 14:17:31 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1K8yTt-0000J3-EE for user-java@ibatis.apache.org; Wed, 18 Jun 2008 07:17:49 -0700 Message-ID: <17983701.post@talk.nabble.com> Date: Wed, 18 Jun 2008 07:17:49 -0700 (PDT) From: WhyDontYouSlide To: user-java@ibatis.apache.org Subject: Re: isPropertyAvailable not working In-Reply-To: <17981459.post@talk.nabble.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: whydontyouslide@gmail.com References: <17981459.post@talk.nabble.com> X-Virus-Checked: Checked by ClamAV on apache.org Hey all, after thousands tries i went to the solution...a bit strange IBATIS seems not supporting java.util.Map and all his children classes as parameters for apply isPropertyAvailable... this happens in fact only if u have objects to be tested inside the HashMap. IBATIS cannot recognize if that object inside the Map is NULL or NOT PRESENT! so the best workaround it seems to be to pass the JavaBean instead of the Map as parameter!!! parameterClass="it.fondsai.odg.entity.ricerca.polizza.FiltroRicercaPolizza" while in your DAO Java class u do something like this: final FiltroRicercaPolizza param = yourObjectHere //(passed as parameter) List polizze = (List) getSqlMapClientTemplate().execute(new SqlMapClientCallback() { public Object doInSqlMapClient(SqlMapExecutor executor) throws SQLException { return executor.queryForList("getDettaglioElencoPolizze", param); } }); where param is a JavaBean instead of Map or any implementation of maps! WhyDontYouSlide wrote: > > Hey all, > > i'm having somthing like this: > > SELECT > NUM.COD_COMPAGNIA, > NUM.NUM_POLIZZA, > NUM.IDE_TELAIO_TARG, > NUM.DTA_EFFETTO > FROM POLIZZA_NUM NUM > > LEFT JOIN POLIZZA_CLIENTE POL_CLI > ON POL_CLI.ID_POLIZZA = NUM.ID_POLIZZA > > > property="filtroPolizza.ricercaCliente.codCliente"> > POL_CLI.COD_CLIENTE = > #filtroPolizza.ricercaCliente.codCliente# > > property="filtroPolizza.ricercaCliente.ruolo"> > POL_CLI.COD_TIPO_RUOLO = #filtroPolizza.ricercaCliente.ruolo# > > > > AND POL_CLI.FLG_PRINCIPALE = '1' > AND POL_CLI.COD_TIPO_RUOLO = '1' > > > > problem is that i'm 100% SURE (inspecting in debug mode) that the object > "filtroPolizza.ricercaCliente" IS NOT NULL and also the subProperty > "getCodCliente" is NOT NULL as well... > > and the dynamic tag "isPropertyAvailable" FAIL the test and go for the > "isNOTpropertyAvailable" section instead... > > where did I go wrong? cant understand the reason.... > > I've also tried to swithc from notNull to NotEmpty with no better result > the problem is really on the "jump" of "isPropertyAvailable" which i get > false instead of true.. > > plz help > > WDYS > -- View this message in context: http://www.nabble.com/isPropertyAvailable-not-working-tp17981459p17983701.html Sent from the iBATIS - User - Java mailing list archive at Nabble.com.