[ http://issues.apache.org/jira/browse/IBATIS-172?page=all ]

Tom Bloomfield updated IBATIS-172:
----------------------------------

    Attachment: test.xml
                TestTO.java

Unit test files.

> implicit mapping fails on nested column aliases
> -----------------------------------------------
>
>          Key: IBATIS-172
>          URL: http://issues.apache.org/jira/browse/IBATIS-172
>      Project: iBatis for Java
>         Type: Bug
>   Components: SQL Maps
>     Versions: 2.1.0, 2.1.5
>  Environment: Win2000 / Oracle
>     Reporter: Tom Bloomfield
>     Priority: Minor
>  Attachments: AutoResultMap.java, NestedTO1.java, NestedTO2.java, 
> NestedTest.java, TestTO.java, test.xml
>
> Using the implicit mapping example below:
> <select id="test" resultClass="foo">
> SELECT
>   1 AS "nested.col1"
> FROM
>   DUAL
> </select>
> Logic exists in ComplexBeanProbe that splits the target property name on "." 
> when defined as a map in the XML:
> <result property="nested.col1" column="1" />
> I don't see the same logic in sqlmap.engine.mapping.result.AutoResultMap ( 
> I'm assuming this is the
> class responsible for initializing implicit queries ;-))
> It appears the target class members are being introspected by ClassInfo, 
> added to a hash of member names, then the LITERAL column name returned by 
> ResultSetMetaData being searched for in that hash... (IE, we'd look
> for a method named "nested.col1" in the method hash, when I really want it to 
> look for setNested().setCol1()).

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to