You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ibatis.apache.org by "Tom Bloomfield (JIRA)" <ib...@incubator.apache.org> on 2005/07/19 16:59:45 UTC

[jira] Created: (IBATIS-172) implicit mapping fails on nested column aliases

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


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


[jira] Updated: (IBATIS-172) implicit mapping fails on nested column aliases

Posted by "Tom Bloomfield (JIRA)" <ib...@incubator.apache.org>.
     [ http://issues.apache.org/jira/browse/IBATIS-172?page=all ]

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

    Attachment: NestedTest.java
                NestedTO1.java
                NestedTO2.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
>
> 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


[jira] Updated: (IBATIS-172) implicit mapping fails on nested column aliases

Posted by "Tom Bloomfield (JIRA)" <ib...@incubator.apache.org>.
     [ 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


[jira] Commented: (IBATIS-172) implicit mapping fails on nested column aliases

Posted by "Tom Bloomfield (JIRA)" <ib...@incubator.apache.org>.
    [ http://issues.apache.org/jira/browse/IBATIS-172?page=comments#action_12329461 ] 

Tom Bloomfield commented on IBATIS-172:
---------------------------------------

Fixed - Attached test cases + source code.

> 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

>
> 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


[jira] Updated: (IBATIS-172) implicit mapping fails on nested column aliases

Posted by "Tom Bloomfield (JIRA)" <ib...@incubator.apache.org>.
     [ http://issues.apache.org/jira/browse/IBATIS-172?page=all ]

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

    Attachment: AutoResultMap.java

> 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
>
> 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


[jira] Commented: (IBATIS-172) implicit mapping fails on nested column aliases

Posted by "Tom Bloomfield (JIRA)" <ib...@incubator.apache.org>.
    [ http://issues.apache.org/jira/browse/IBATIS-172?page=comments#action_12316103 ] 

Tom Bloomfield commented on IBATIS-172:
---------------------------------------

I will attach unit tests and fixed source for this issue.

> 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

>
> 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


[jira] Closed: (IBATIS-172) implicit mapping fails on nested column aliases

Posted by "Clinton Begin (JIRA)" <ib...@incubator.apache.org>.
     [ http://issues.apache.org/jira/browse/IBATIS-172?page=all ]
     
Clinton Begin closed IBATIS-172:
--------------------------------

    Fix Version: 2.2.0
     Resolution: Fixed
      Assign To: Clinton Begin

Fixed as described.  Thanks for the details and the solution.

> 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
>     Assignee: Clinton Begin
>     Priority: Minor
>      Fix For: 2.2.0
>  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