From: Michael D. <mik...@us...> - 2004-08-20 15:27:46
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Impl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23721/NHibernate/Impl Modified Files: QueryImpl.cs Log Message: Fixed problem with IN parameters. Index: QueryImpl.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Impl/QueryImpl.cs,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** QueryImpl.cs 16 Aug 2004 05:21:44 -0000 1.11 --- QueryImpl.cs 20 Aug 2004 15:27:37 -0000 1.12 *************** *** 85,89 **** public IQuery SetParameter(string name, object val, IType type) { ! namedParameters.Add(name, new TypedValue(type, val)); return this; } --- 85,89 ---- public IQuery SetParameter(string name, object val, IType type) { ! namedParameters[name] = new TypedValue(type, val); return this; } *************** *** 302,307 **** public IQuery SetParameterList(string name, ICollection vals) { ! foreach(object obj in vals) { ! SetParameterList(name, vals, GuessType( obj.GetType() ) ); break; // fairly hackish...need the type of the first object } --- 302,309 ---- public IQuery SetParameterList(string name, ICollection vals) { ! foreach(object obj in vals) ! { ! // SetParameterList(name, vals, GuessType( obj.GetType() ) ); ! SetParameterList(name, vals, GuessType(obj) ); break; // fairly hackish...need the type of the first object } |