Re: dynamic resultmap?

2008-10-22 Thread Jeff Butler
You can't change the resultMap/resultClass on the fly. The best you can do there is to use a HashMap as the resultClass and set remapResults="true". Then you have to figure out what got returned on the Java side. The includes can be *sort of* dynamic. The trick is to ALWAYS include the SQL frag

Re: Error with ibatis runing queryForList

2008-10-22 Thread Ashish Kulkarni
Hi This is my code // Create SQlMapClient Properties prop = new Properties(); prop.setProperty("url", url.trim()); prop.setProperty("driver", driver); prop.setProperty("username", userid); prop.setProperty("password", password); String resource = "SQLMapConfigWeb.xml"; Reader reader = R

Re: How to iterate over two (or more) collections simultaneously ?

2008-10-22 Thread Jeff Butler
Simple answer - no. You could make a List of HashMaps to accomplish this: $listOfMaps[].name$ $listOfMaps[].type$ It's a little more work on the Java side of things, but it will work. Jeff Butler On Wed, Oct 22, 2008 at 5:18 PM, Pascal Jacob <[EMAIL PROTECTED]> wrote: > Hi again, > >

Re: dynamic resultmap?

2008-10-22 Thread joson yu
look into the and elements?i met this problem too.could you show me some example? thanks

How to iterate over two (or more) collections simultaneously ?

2008-10-22 Thread Pascal Jacob
Hi again, Is it possible to iterate over two (or more) collections SIMULTANEOUSLY using the same indice ? Here is a example: parameterMap="create-data-table-param"> CREATE TABLE data $names[]$ $

Re: dynamic CREATE TABLE woe

2008-10-22 Thread Pascal Jacob
Investigating more, I found the following evidences in the PreparedStatement sent by iBatis (I finally found the way to make iBatis log under SLF4J): 22:29:39.296 [DEBUG] [main] [java.sql.PreparedStatement:26] - {pstm-12} Executing Statement: CREATE TABLE seqnsdb.seqnsdata ( {name=ID, t

RE: Error with ibatis runing queryForList

2008-10-22 Thread Yamil Bracho
Would you mind to us your mapping and java code.. ? Date: Wed, 22 Oct 2008 15:55:33 -0400 From: [EMAIL PROTECTED] To: user-java@ibatis.apache.org Subject: Error with ibatis runing queryForList Hi I am gettig following error when trying to sqlSession.queryForList() com.ibatis.sqlmap.engine.impl.

Error with ibatis runing queryForList

2008-10-22 Thread Ashish Kulkarni
Hi I am gettig following error when trying to sqlSession.queryForList() com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.endTransaction(SqlMapExecutorDelegate.java:776) at com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.endTransaction(SqlMapSessionImpl.java:141) at com.ibatis.sqlmap.engin

RE: Problems with Dynamic SQL

2008-10-22 Thread Yamil Bracho
Well, I change my mapping to SELECT co_afiliacion, nu_rif, nb_empresa, cce.solicitud_afiliacion.co_sector, cce.sector.nb_sector, cce.solicitud_afiliacion.co_

RE: Problems with Dynamic SQL

2008-10-22 Thread Yamil Bracho
Thanks Larry. I take out the CDATA tags and got SELECT co_afiliacion, nu_rif, nb_empresa, cce.solicitud_afiliacion.co_sector, cce.sector.nb_sector, cce.soli

Re: Problems with Dynamic SQL

2008-10-22 Thread Larry Meadors
If you put xml tags in a cdata section, they are ignored...that's the point of the cdata section... Larry On Wed, Oct 22, 2008 at 10:19 AM, Yamil Bracho <[EMAIL PROTECTED]> wrote: > Hi. > I have this mapping > > parameterClass="java.util.HashMap" > resultMap="mapSolA

Problems with Dynamic SQL

2008-10-22 Thread Yamil Bracho
Hi. I have this mapping Where nu_rif is a String field and rifList is an array o String. In java I did: Map parameters = new HashMap(); parameters.put("codigoBanco", codigoBanco); parameters.put("rifList", rifList.split(","));