You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-cs@ibatis.apache.org by Michael Schall <mi...@gmail.com> on 2007/01/26 00:17:11 UTC

Case Sensitive Parameter Search

While discovering parameters for a Stored Procedure, the DbParameters are
being sorted to match the order used in the parameter map.

            // Re-sort DbParameters to match order used in the parameterMap
            IDbDataParameter[] sortedDbParameters = new IDbDataParameter[
commandParameters.Length];
            for (int i = 0; i < _statement.ParameterMap.Properties.Count;
i++)
            {
                sortedDbParameters[i] = Search(session,
_preparedStatement.DbParameters, _statement.ParameterMap.Properties[i], i);
            }
            _preparedStatement.DbParameters = sortedDbParameters;

Inside the Search function the property is found by name using

                    if (property.ColumnName.Equals(parameterName))

The parameterName from the stored procedure is @RecID but in my parameter
map the column is defined as RecId.  This worked fine in 1.3.1 are we going
to case sensitive matching with 1.5.1/svn?  I'm using the current from
svn...

Thanks
Mike

Re: Case Sensitive Parameter Search

Posted by Michael Schall <mi...@gmail.com>.
That's fine, just wanted to make sure it was a conscience decision...

I just wish it was something that would break at compile time :)

Thanks for the reply

On 1/26/07, Gilles Bayon <ib...@gmail.com> wrote:
>
> I think we will keep it as it is, it's cleaner.
>
> --
> Cheers,
> Gilles
>
> <a href="http://www.amazon.com/gp/registry/6JCP7AORB0LE">Wish List</a>
>

Re: Case Sensitive Parameter Search

Posted by Gilles Bayon <ib...@gmail.com>.
I think we will keep it as it is, it's cleaner.

-- 
Cheers,
Gilles

<a href="http://www.amazon.com/gp/registry/6JCP7AORB0LE">Wish List</a>