emacarron / mybatis

Automatically exported from code.google.com/p/mybatis
0 stars 0 forks source link

Collection for returning a list of Strings. #82

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What version of the MyBatis are you using? 3.0.1

Please describe the problem.  Unit tests are best!
 I was trying to return a list of strings in one statement:
 <collection property="someStrings" column="MYSTRING" ofType="string"/>

What is the expected output? What do you see instead?
  Expected a list of strings.  Ended up with a single string.

Please provide any additional information below.
Changing code worked.  I had to change to this:
  <collection property="someStrings" ofType="string"> 
    <result column="MYSTRING"/> 
  </collection>

Single statement to get result would be nice.

Original issue reported on code.google.com by q211222...@yahoo.com on 16 Aug 2010 at 4:24

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Right now the column attribute is not used in nested selects. 

This will be an exception to that rule and I am afraid this change can create 
more confusion than help.

Original comment by eduardo.macarron on 11 Apr 2012 at 6:58