|
From: Michael D. <mik...@us...> - 2004-04-19 04:32:39
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Sql In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16820/NHibernate/Sql Modified Files: QueryJoinFragment.cs Log Message: Trying to get the HQL back to being able to handle the basic HQL - found some quick fixes. Index: QueryJoinFragment.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Sql/QueryJoinFragment.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** QueryJoinFragment.cs 9 Mar 2003 15:10:10 -0000 1.2 --- QueryJoinFragment.cs 19 Apr 2004 04:32:30 -0000 1.3 *************** *** 83,88 **** public override void AddCondition(string condition) { ! if ( !condition.StartsWith(" and ") ) afterWhere.Append(" and "); ! afterWhere.Append(condition); } --- 83,95 ---- public override void AddCondition(string condition) { ! if ( ! afterFrom.ToString().IndexOf( condition.Trim() ) < 0 && ! afterWhere.ToString().IndexOf( condition.Trim() ) < 0 ) ! { ! ! ! if ( !condition.StartsWith(" and ") ) afterWhere.Append(" and "); ! afterWhere.Append(condition); ! } } |