|
View:
New views
1 Messages
—
Rating Filter:
Alert me
|
|
|
[jira] Issue Comment Edited: (IBATIS-133) ResultMap Method Mapping[ https://issues.apache.org/jira/browse/IBATIS-133?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12629882#action_12629882 ] dnathanson edited comment on IBATIS-133 at 9/10/08 10:47 AM: ---------------------------------------------------------------- This has been available for constructor args in iBatis for .NET for a couple of years. It was added under IBATISNET-155. I would expect that the Java and .NET are very similar in this area of the framework so the changes should be easily ported. But I haven't looked at either code line, so that assumption could be totally off base. was (Author: dnathanson): This has been available in iBatis for .NET for a couple of years. It was added under IBATISNET-155. I would expect that the Java and .NET are very similar in this area of the framework so the changes should be easily ported. But I haven't looked at either code line, so that assumption could be totally off base. > ResultMap Method Mapping > ------------------------ > > Key: IBATIS-133 > URL: https://issues.apache.org/jira/browse/IBATIS-133 > Project: iBatis for Java > Issue Type: New Feature > Components: SQL Maps > Affects Versions: 2.1.0 > Reporter: Brandon Goodin > > Method mapping should be supported in ibatis to map to non-javaBean methods. > Following are some whiteboard ideas for this: > A standard verbose mapping - > <resultMap> > <method > name="methodName" > signature="propertyA,propertyB" > javaTypes="integer,string" > jdbcTypes="INTEGER,VARCHAR" > columns="PROPERTY_A,PROPERTY_B" /> > </resultMap> > If types map cleanly between columns and java types some configuration can be avoided - > <resultMap> > <method > name="methodName" > signature="propertyA,propertyB" > columns="PROPERTY_A,PROPERTY_B" /> > </resultMap> > column Indexes should also be supported - > <resultMap> > <method > name="methodName" > signature="propertyA,propertyB" > columnIndexes="3,8" /> > </resultMap> > we could also use the method mapping for constructors as well. Only one constructor method type can exist per resultMap. type="method" would be the default unspecified method type. > <resultMap> > <method > type="constructor" > name="methodName" > signature="propertyA,propertyB" > columnIndexes="3,8" /> > </resultMap> > Something else to consider is how a method signature can be mapped to both complex objects and simple objects. Perhaps we need to go with a more verbose mapping. > <resultMap> > <method type="standard" name="methodName"> > > > > </method> > </resultMap> > Not sure if we would want to support both or just one type. But, those are the ideas. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
| Free Forum Powered by Nabble | Forum Help |