|
From: Peter S. <sz...@us...> - 2004-04-14 14:48:57
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Hql In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17813/NHibernate/Hql Modified Files: FromPathExpressionParser.cs QueryTranslator.cs Log Message: Fixed dialect. Fixed some Hql thing. Added obsoletes for quoting. Index: FromPathExpressionParser.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Hql/FromPathExpressionParser.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** FromPathExpressionParser.cs 13 Mar 2003 21:58:48 -0000 1.3 --- FromPathExpressionParser.cs 14 Apr 2004 14:48:47 -0000 1.4 *************** *** 4,21 **** using NHibernate.Sql; ! namespace NHibernate.Hql { /// <summary> /// FromPathExpressionParser /// </summary> ! public class FromPathExpressionParser : PathExpressionParser { ! public override void End(QueryTranslator q) { ! if ( !IsCollectionValued ) { IType type = GetPropertyType(q); ! if ( type.IsEntityType ) { // "finish off" the join Token(".", q); Token(null, q); ! }else if ( type.IsPersistentCollectionType ) { // default to element set if no elements() specified Token(".", q); --- 4,28 ---- using NHibernate.Sql; ! namespace NHibernate.Hql ! { /// <summary> /// FromPathExpressionParser /// </summary> ! public class FromPathExpressionParser : PathExpressionParser ! { ! public override void End(QueryTranslator q) ! { ! if ( !IsCollectionValued ) ! { IType type = GetPropertyType(q); ! if ( type.IsEntityType ) ! { // "finish off" the join Token(".", q); Token(null, q); ! } ! else if ( type.IsPersistentCollectionType ) ! { // default to element set if no elements() specified Token(".", q); *************** *** 26,30 **** } ! protected override void SetExpectingCollectionIndex() { throw new QueryException("expecting .elements or .indices after collection path expression in from"); } --- 33,38 ---- } ! protected override void SetExpectingCollectionIndex() ! { throw new QueryException("expecting .elements or .indices after collection path expression in from"); } Index: QueryTranslator.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Hql/QueryTranslator.cs,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** QueryTranslator.cs 14 Apr 2004 12:34:00 -0000 1.22 --- QueryTranslator.cs 14 Apr 2004 14:48:47 -0000 1.23 *************** *** 63,67 **** private IDictionary replacements; private int count = 0; - private int nameCount=0; private int parameterCount = 0; private string queryString; --- 63,66 ---- *************** *** 550,553 **** --- 549,553 ---- names[i] = name; includeInSelect[i] = !entitiesToFetch.Contains(name); + if ( includeInSelect[i] ) selectLength++; if ( name.Equals(collectionOwnerName) ) collectionOwnerColumn = i; } *************** *** 1155,1161 **** return sql; } ! //TODO: H2.0.3: change the dialect class!!! ! //else if (dialect.SupportsForUpdateOf) ! else if (dialect.SupportsForUpdate) { LockMode upgradeType = null; --- 1155,1159 ---- return sql; } ! else if (dialect.SupportsForUpdateOf) { LockMode upgradeType = null; |