Well, I wasn't quite right in what I said. RowBounds is the exception to the rule - so if you pass more than one parameter in addition to RowBounds, then you must use the @Param annotation. In your case, you don't need to annotate and "value" is the right default.
Jeff Butler On Mon, Feb 8, 2010 at 5:12 PM, Tom Carchrae <carch...@gmail.com> wrote: > > > > Jeff Butler-2 wrote: >> >> Look at the @Param annotation. If you pass more than one parameter to >> a mapper method, them you must annotate ALL parameters: >> >> List<Map> selectAllFromTable(@Param("rowBounds") RowBounds rowBounds, >> @Param("tableName") String tableName); >> >> Whenever I forget to do this, I see errors about NULL values. >> > > This makes sense. I had wondered what magic it was using to make the > mapping between the parameter name and the select statement. (ie, none, or > as Larry pointed out, 'value' is a default mapping name) > > Thanks for the tip. :) > > Tom > -- > View this message in context: > http://old.nabble.com/table-name-as-parameter-tp27505213p27507890.html > Sent from the iBATIS - User - Java mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-java-unsubscr...@ibatis.apache.org > For additional commands, e-mail: user-java-h...@ibatis.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: user-java-unsubscr...@ibatis.apache.org For additional commands, e-mail: user-java-h...@ibatis.apache.org