Add support for Java's remapResults="true"
------------------------------------------
Key: IBATISNET-114
URL: http://issues.apache.org/jira/browse/IBATISNET-114
Project: iBatis for .NET
Type: Bug
Reporter: Ron Grabowski
Assigned to: Gilles Bayon
Priority: Minor
// DynamicTest.cs
[Test]
public void TestDynamicSqlOnColumnSelection()
{
Account paramAccount = new Account();
Account resultAccount = new Account();
IList list = null;
paramAccount.LastName = "Dalton";
list = sqlMap.QueryForList("DynamicSqlOnColumnSelection", paramAccount);
resultAccount = (Account)list[0];
Console.WriteLine("FirstName: [{0}]", resultAccount.FirstName);
AssertAccount1((Account) list[0]);
Assert.AreEqual(5, list.Count);
paramAccount.LastName = "Bayon";
list = sqlMap.QueryForList("DynamicSqlOnColumnSelection", paramAccount);
resultAccount = (Account)list[0];
// should be null
Console.WriteLine("FirstName: [{0}]", resultAccount.FirstName);
AssertAccount1(resultAccount);
Assert.AreEqual(5, list.Count);
}
<!-- populate certain fields based on the parameterObject -->
<statement
id="DynamicSqlOnColumnSelection"
parameterClass="Account"
resultClass="Account">
SELECT
Account_ID as Id,
<isEqual property="LastName" compareValue="Dalton" >
Account_FirstName as FirstName,
</isEqual>
<isEqual property="LastName" compareValue="Dalton" >
Account_LastName as LastName,
</isEqual>
Account_Email as EmailAddress
FROM
Accounts
</statement>
--
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