Re: Dynamic sql map with java.util.List

2007-08-27 Thread Brandon Goodin
Since you are using 2.1.7 you will need to upgrade and try this with the most current version. I believe this issue is fixed in the most current version. I could be wrong. I made the same comment on the JIRA ticket. But, I figured it would be worth repeating here. Thanks, Brandon On 8/27/07, Mich

Re: Dynamic sql map with java.util.List

2007-08-27 Thread Brandon Goodin
Please open a JIRA ticket on this if it does not exist. In the meantime you may want to pass your list in nested in a map. Brandon On 8/27/07, Michel Amaral <[EMAIL PROTECTED]> wrote: > > When I use parameterClass of java.util.List type with dynamic notation > ($[].field$), the property (after do

Dynamic sql map with java.util.List

2007-08-27 Thread Michel Amaral
When I use parameterClass of java.util.List type with dynamic notation ($[].field$), the property (after dot) is ignored and the toString method of the current list element is called instead of the indicated property, for example, the follow statement map is calling toString twice: SELECT FROM

Re: dynamic sql map

2006-01-12 Thread Nathan Maves
You are asking us if your code works? A few things I might change... 1. change your tag to a 2. add a parameter class attribute to the select 3. If you are going to have different numbers of columns selected then you need to set reMapResults = true. This is really the lazy mans way to thin

dynamic sql map

2006-01-12 Thread Henry Lu
Is this sql mapping works in the IBATIS? select $list_cols$ FROM $table_name$ Map map = new HashMap(2); map.put("list_cols", "STATE_ABBRV, STATE"); map.put("table_name", "USSTATE_DESC"); return getSqlMapClientTemplate().queryForList( "select_list", map); -Hen

Re: dynamic sql map

2006-01-11 Thread Larry Meadors
You need to get your SQL logging working - search the archives to get that working. The problem you are having are not iBATIS issues, they are because the SQL that you are building is broken. Get your logging working, and the resolution will be apparent. Larry On 1/11/06, Henry Lu <[EMAIL PROT

Re: dynamic sql map

2006-01-11 Thread Henry Lu
I made changes and it worked! But now I made more changes and it broken again: org.springframework.jdbc.BadSqlGrammarException: Bad SQL grammar [] in task 'SqlMapClient operation'; nested exception is com.ibatis.common.jdbc.exception.NestedSQLException: --- The error occurred while applying a

Re: dynamic sql map

2006-01-11 Thread Ben Munat
If you're using commons logging (and you should be), you can set logging for "java.sql" to debug (in the properties file version: "log4j.logger.java.sql=DEBUG"). This will print all the generated SQL, along with parameters and result sets, in your log. Also, it looks like the error message says

RE: dynamic sql map

2006-01-11 Thread Voorhoeve, Niels {PBG}
EMAIL PROTECTED] Sent: Wednesday, January 11, 2006 11:15 AM To: user-java@ibatis.apache.org Subject: dynamic sql map I got errors: org.springframework.jdbc.BadSqlGrammarException: Bad SQL grammar [] in task 'SqlMapClient operation'; nested exception is com.ibatis.common.jdbc.exception.Nes

Re: dynamic sql map

2006-01-11 Thread Larry Meadors
I always try to simplify first, then add stuff until it breaks. For example, try this: select STATE_ABBRV as m_name, STATE as m_value FROM USSTATE_DESC Does that work? You may also want to enable logging, and/or try something like p6spy to see the SQL. This is a SQL error, based on the me

dynamic sql map

2006-01-11 Thread Henry Lu
I got errors: org.springframework.jdbc.BadSqlGrammarException: Bad SQL grammar [] in task 'SqlMapClient operation'; nested exception is com.ibatis.common.jdbc.exception.NestedSQLException: --- The error occurred in edu/umich/med/umms/coreyp/dao/ibatis_map/misc.xml. --- The error occurred whil