You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ibatis.apache.org by "Chris Potter (JIRA)" <ib...@incubator.apache.org> on 2006/05/17 17:33:06 UTC
[jira] Created: (IBATISNET-158)
TypeAssemblyInfo.SplitTypeAndAssemblyNames
TypeAssemblyInfo.SplitTypeAndAssemblyNames
------------------------------------------
Key: IBATISNET-158
URL: http://issues.apache.org/jira/browse/IBATISNET-158
Project: iBatis for .NET
Type: Improvement
Components: DataMapper
Versions: DataMapper 1.3
Reporter: Chris Potter
Hi All:
I'd like to propose a change to the TypeAssemblyInfo internal class within TypeResolver.cs. Please see the proposed code change below.
private void SplitTypeAndAssemblyNames (string originalTypeName)
{
int typeAssemblyIndex
// Original Code = originalTypeName.IndexOf (
= originalTypeName.LastIndexOf (
TypeAssemblyInfo.TypeAssemblySeparator);
if (typeAssemblyIndex < 0)
{
unresolvedTypeName = originalTypeName;
}
else
{
unresolvedTypeName = originalTypeName.Substring (
0, typeAssemblyIndex).Trim ();
unresolvedAssemblyName = originalTypeName.Substring (
typeAssemblyIndex + 1).Trim ();
}
}
Changing the call from IndexOf to LastIndexOf allows me to define a .Net 2.0 generic in the listClass attribute of a statement definition. You can see an example below. This syntax is impropertly parsed for a comma without this proposed change.
<select id="LoadCodesByCategory" parameterMap="CodeData.CodeDataByCategoryParams" resultMap="LoadStateCode" listClass="System.Collections.Generic.List`1[[NFS.Data.Core.DataObjects.Impl.StateCode, NFS.Data.Impl]], mscorlib">
--
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: (IBATISNET-158)
TypeAssemblyInfo.SplitTypeAndAssemblyNames
Posted by "Gilles Bayon (JIRA)" <ib...@incubator.apache.org>.
[ http://issues.apache.org/jira/browse/IBATISNET-158?page=all ]
Gilles Bayon closed IBATISNET-158:
----------------------------------
Fix Version: DataMapper 1.4
Resolution: Fixed
In SVN
> TypeAssemblyInfo.SplitTypeAndAssemblyNames
> ------------------------------------------
>
> Key: IBATISNET-158
> URL: http://issues.apache.org/jira/browse/IBATISNET-158
> Project: iBatis for .NET
> Type: Improvement
> Components: DataMapper
> Versions: DataMapper 1.3
> Reporter: Chris Potter
> Assignee: Gilles Bayon
> Fix For: DataMapper 1.4
>
> Hi All:
>
> I'd like to propose a change to the TypeAssemblyInfo internal class within TypeResolver.cs. Please see the proposed code change below.
>
> private void SplitTypeAndAssemblyNames (string originalTypeName)
> {
> int typeAssemblyIndex
> // Original Code = originalTypeName.IndexOf (
> = originalTypeName.LastIndexOf (
> TypeAssemblyInfo.TypeAssemblySeparator);
> if (typeAssemblyIndex < 0)
> {
> unresolvedTypeName = originalTypeName;
> }
> else
> {
> unresolvedTypeName = originalTypeName.Substring (
> 0, typeAssemblyIndex).Trim ();
> unresolvedAssemblyName = originalTypeName.Substring (
> typeAssemblyIndex + 1).Trim ();
> }
> }
>
> Changing the call from IndexOf to LastIndexOf allows me to define a .Net 2.0 generic in the listClass attribute of a statement definition. You can see an example below. This syntax is impropertly parsed for a comma without this proposed change.
>
> <select id="LoadCodesByCategory" parameterMap="CodeData.CodeDataByCategoryParams" resultMap="LoadStateCode" listClass="System.Collections.Generic.List`1[[NFS.Data.Core.DataObjects.Impl.StateCode, NFS.Data.Impl]], mscorlib">
>
--
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: (IBATISNET-158)
TypeAssemblyInfo.SplitTypeAndAssemblyNames
Posted by "Gilles Bayon (JIRA)" <ib...@incubator.apache.org>.
[ http://issues.apache.org/jira/browse/IBATISNET-158?page=comments#action_12412648 ]
Gilles Bayon commented on IBATISNET-158:
----------------------------------------
You don't need to specify a listClas, just use the generic syntax of QueryForList
sqlMap.QueryForList<StateCode>( statementID, codeDataByCategoryParams)
I will fix the issue.
> TypeAssemblyInfo.SplitTypeAndAssemblyNames
> ------------------------------------------
>
> Key: IBATISNET-158
> URL: http://issues.apache.org/jira/browse/IBATISNET-158
> Project: iBatis for .NET
> Type: Improvement
> Components: DataMapper
> Versions: DataMapper 1.3
> Reporter: Chris Potter
> Assignee: Gilles Bayon
>
> Hi All:
>
> I'd like to propose a change to the TypeAssemblyInfo internal class within TypeResolver.cs. Please see the proposed code change below.
>
> private void SplitTypeAndAssemblyNames (string originalTypeName)
> {
> int typeAssemblyIndex
> // Original Code = originalTypeName.IndexOf (
> = originalTypeName.LastIndexOf (
> TypeAssemblyInfo.TypeAssemblySeparator);
> if (typeAssemblyIndex < 0)
> {
> unresolvedTypeName = originalTypeName;
> }
> else
> {
> unresolvedTypeName = originalTypeName.Substring (
> 0, typeAssemblyIndex).Trim ();
> unresolvedAssemblyName = originalTypeName.Substring (
> typeAssemblyIndex + 1).Trim ();
> }
> }
>
> Changing the call from IndexOf to LastIndexOf allows me to define a .Net 2.0 generic in the listClass attribute of a statement definition. You can see an example below. This syntax is impropertly parsed for a comma without this proposed change.
>
> <select id="LoadCodesByCategory" parameterMap="CodeData.CodeDataByCategoryParams" resultMap="LoadStateCode" listClass="System.Collections.Generic.List`1[[NFS.Data.Core.DataObjects.Impl.StateCode, NFS.Data.Impl]], mscorlib">
>
--
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: (IBATISNET-158)
TypeAssemblyInfo.SplitTypeAndAssemblyNames
Posted by "Chris Potter (JIRA)" <ib...@incubator.apache.org>.
[ http://issues.apache.org/jira/browse/IBATISNET-158?page=comments#action_12414174 ]
Chris Potter commented on IBATISNET-158:
----------------------------------------
Hi Gilles:
I'm a bit confused by both your comment and your fix. We're currently using version 1.3 which doesn't support the generic signatures of the QueryForList, etc., methods. It is also important to note we're using the ExecuteQueryForRowDelegate method extensively. In DataMapper 1.3, while it is true I can call QueryForList using the signature that takes any IList implementation, the same type of signature doesn't exist for the ExecuteQueryForRowDelegate call. This was my motivation for proposing this change. You stated you corrected the issue in 1.5, however, it appears to me you only handle my proposed change in the event the type name provided in listClass begins with "System.Nullable". In my case the typename begins with "System.Collections". Am I missing something? Also, is it possible to get the change I proposed into the 1.3 code base?
Thanks,
Chris
> TypeAssemblyInfo.SplitTypeAndAssemblyNames
> ------------------------------------------
>
> Key: IBATISNET-158
> URL: http://issues.apache.org/jira/browse/IBATISNET-158
> Project: iBatis for .NET
> Type: Improvement
> Components: DataMapper
> Versions: DataMapper 1.3
> Reporter: Chris Potter
> Assignee: Gilles Bayon
> Fix For: DataMapper 1.5
>
> Hi All:
>
> I'd like to propose a change to the TypeAssemblyInfo internal class within TypeResolver.cs. Please see the proposed code change below.
>
> private void SplitTypeAndAssemblyNames (string originalTypeName)
> {
> int typeAssemblyIndex
> // Original Code = originalTypeName.IndexOf (
> = originalTypeName.LastIndexOf (
> TypeAssemblyInfo.TypeAssemblySeparator);
> if (typeAssemblyIndex < 0)
> {
> unresolvedTypeName = originalTypeName;
> }
> else
> {
> unresolvedTypeName = originalTypeName.Substring (
> 0, typeAssemblyIndex).Trim ();
> unresolvedAssemblyName = originalTypeName.Substring (
> typeAssemblyIndex + 1).Trim ();
> }
> }
>
> Changing the call from IndexOf to LastIndexOf allows me to define a .Net 2.0 generic in the listClass attribute of a statement definition. You can see an example below. This syntax is impropertly parsed for a comma without this proposed change.
>
> <select id="LoadCodesByCategory" parameterMap="CodeData.CodeDataByCategoryParams" resultMap="LoadStateCode" listClass="System.Collections.Generic.List`1[[NFS.Data.Core.DataObjects.Impl.StateCode, NFS.Data.Impl]], mscorlib">
>
--
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: (IBATISNET-158)
TypeAssemblyInfo.SplitTypeAndAssemblyNames
Posted by "Gilles Bayon (JIRA)" <ib...@incubator.apache.org>.
[ http://issues.apache.org/jira/browse/IBATISNET-158?page=comments#action_12414201 ]
Gilles Bayon commented on IBATISNET-158:
----------------------------------------
I have redo the type resolver to support all generic type.
You case should be handle by the current code even if you don't see your fix.
See unit test IBatisNet.Common.Test.NUnit.CommonTests.Utilities.TypeResolverTest.
-Gilles
> TypeAssemblyInfo.SplitTypeAndAssemblyNames
> ------------------------------------------
>
> Key: IBATISNET-158
> URL: http://issues.apache.org/jira/browse/IBATISNET-158
> Project: iBatis for .NET
> Type: Improvement
> Components: DataMapper
> Versions: DataMapper 1.3
> Reporter: Chris Potter
> Assignee: Gilles Bayon
> Fix For: DataMapper 1.5
>
> Hi All:
>
> I'd like to propose a change to the TypeAssemblyInfo internal class within TypeResolver.cs. Please see the proposed code change below.
>
> private void SplitTypeAndAssemblyNames (string originalTypeName)
> {
> int typeAssemblyIndex
> // Original Code = originalTypeName.IndexOf (
> = originalTypeName.LastIndexOf (
> TypeAssemblyInfo.TypeAssemblySeparator);
> if (typeAssemblyIndex < 0)
> {
> unresolvedTypeName = originalTypeName;
> }
> else
> {
> unresolvedTypeName = originalTypeName.Substring (
> 0, typeAssemblyIndex).Trim ();
> unresolvedAssemblyName = originalTypeName.Substring (
> typeAssemblyIndex + 1).Trim ();
> }
> }
>
> Changing the call from IndexOf to LastIndexOf allows me to define a .Net 2.0 generic in the listClass attribute of a statement definition. You can see an example below. This syntax is impropertly parsed for a comma without this proposed change.
>
> <select id="LoadCodesByCategory" parameterMap="CodeData.CodeDataByCategoryParams" resultMap="LoadStateCode" listClass="System.Collections.Generic.List`1[[NFS.Data.Core.DataObjects.Impl.StateCode, NFS.Data.Impl]], mscorlib">
>
--
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