From: <te...@us...> - 2008-09-20 12:08:17
|
Revision: 3773 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=3773&view=rev Author: tehlike Date: 2008-09-20 11:33:47 +0000 (Sat, 20 Sep 2008) Log Message: ----------- ParameterReplacer renamed to Replacer. It can be used to replace other types of expressions as well. Moving codes in QueryProvider to LinqTranslator Modified Paths: -------------- trunk/nhibernate/src/NHibernate.Linq/Expressions/OrderExpression.cs trunk/nhibernate/src/NHibernate.Linq/Expressions/QuerySourceExpression.cs trunk/nhibernate/src/NHibernate.Linq/Expressions/SelectExpression.cs trunk/nhibernate/src/NHibernate.Linq/NHibernate.Linq.csproj trunk/nhibernate/src/NHibernate.Linq/NHibernateQueryProvider.cs trunk/nhibernate/src/NHibernate.Linq/Query/LinqTranslator.cs trunk/nhibernate/src/NHibernate.Linq/Visitors/AssociationRewriteVisitor.cs trunk/nhibernate/src/NHibernate.Linq/Visitors/NHExpressionToSqlExpressionTransformer.cs trunk/nhibernate/src/NHibernate.Linq/Visitors/NHibernateExpressionVisitor.cs trunk/nhibernate/src/NHibernate.Linq/Visitors/SqlExpressionTranslator.cs trunk/nhibernate/src/NHibernate.Linq/Visitors/WhereExpressionCombiner.cs trunk/nhibernate/src/NHibernate.Linq.Test/NHibernate.Linq.Test.csproj trunk/nhibernate/src/NHibernate.Linq.Test/VisitorTests/OrderTransformerTests.cs Added Paths: ----------- trunk/nhibernate/src/NHibernate.Linq/Visitors/Replacer.cs Removed Paths: ------------- trunk/nhibernate/src/NHibernate.Linq/Visitors/NHExpressionToSqlQueryTranslator.cs trunk/nhibernate/src/NHibernate.Linq/Visitors/ParameterReplacer.cs Modified: trunk/nhibernate/src/NHibernate.Linq/Expressions/OrderExpression.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Linq/Expressions/OrderExpression.cs 2008-09-19 23:34:29 UTC (rev 3772) +++ trunk/nhibernate/src/NHibernate.Linq/Expressions/OrderExpression.cs 2008-09-20 11:33:47 UTC (rev 3773) @@ -2,10 +2,10 @@ namespace NHibernate.Linq.Expressions { - public class OrderExpression : Expression + public class OrderExpression : NHExpression { public OrderExpression(Expression source, LambdaExpression selector, OrderType orderType, System.Type type) - : base((ExpressionType) NHExpressionType.Order, type) + : base(NHExpressionType.Order, type) { Source = source; Selector = selector; Modified: trunk/nhibernate/src/NHibernate.Linq/Expressions/QuerySourceExpression.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Linq/Expressions/QuerySourceExpression.cs 2008-09-19 23:34:29 UTC (rev 3772) +++ trunk/nhibernate/src/NHibernate.Linq/Expressions/QuerySourceExpression.cs 2008-09-20 11:33:47 UTC (rev 3773) @@ -1,4 +1,5 @@ -using System.Linq; +using NHibernate.Persister.Entity; +using IQueryable=System.Linq.IQueryable; namespace NHibernate.Linq.Expressions { @@ -8,17 +9,16 @@ /// </summary> public class QuerySourceExpression : NHExpression { - public QuerySourceExpression(IQueryable query) - : base(NHExpressionType.QuerySource, query.GetType()) + public QuerySourceExpression(System.Type type, IOuterJoinLoadable entityPersister) + : base(NHExpressionType.QuerySource, type) { - Query = query; + this.Persister = entityPersister; } + public IEntityPersister Persister { get; protected set; } - public IQueryable Query { get; protected set; } - public override string ToString() { - return string.Format("(({0})", Type); + return string.Format("({0})", Persister.EntityName); } } } \ No newline at end of file Modified: trunk/nhibernate/src/NHibernate.Linq/Expressions/SelectExpression.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Linq/Expressions/SelectExpression.cs 2008-09-19 23:34:29 UTC (rev 3772) +++ trunk/nhibernate/src/NHibernate.Linq/Expressions/SelectExpression.cs 2008-09-20 11:33:47 UTC (rev 3773) @@ -1,4 +1,6 @@ -using System.Linq.Expressions; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq.Expressions; namespace NHibernate.Linq.Expressions { @@ -7,18 +9,21 @@ /// </summary> public class SelectExpression : NHExpression { - public SelectExpression(System.Type type, string alias, Expression projection, Expression from, Expression where) + public SelectExpression(System.Type type, string alias, Expression projection, + Expression from, Expression where, ReadOnlyCollection<Expression> orderBys) : base(NHExpressionType.Select, type) { Where = where; From = from; FromAlias = alias; Projection = projection; + OrderBys = orderBys; } public Expression Projection { get; protected set; } public string FromAlias { get; protected set; } public Expression Where { get; protected set; } + public ReadOnlyCollection<Expression> OrderBys { get; protected set; } public Expression From { get; protected set; } } } \ No newline at end of file Modified: trunk/nhibernate/src/NHibernate.Linq/NHibernate.Linq.csproj =================================================================== --- trunk/nhibernate/src/NHibernate.Linq/NHibernate.Linq.csproj 2008-09-19 23:34:29 UTC (rev 3772) +++ trunk/nhibernate/src/NHibernate.Linq/NHibernate.Linq.csproj 2008-09-20 11:33:47 UTC (rev 3773) @@ -20,7 +20,7 @@ <DefineConstants>DEBUG;TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> - <TreatWarningsAsErrors>true</TreatWarningsAsErrors> + <TreatWarningsAsErrors>false</TreatWarningsAsErrors> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>none</DebugType> @@ -32,6 +32,10 @@ <TreatWarningsAsErrors>true</TreatWarningsAsErrors> </PropertyGroup> <ItemGroup> + <Reference Include="Iesi.Collections, Version=1.0.0.3, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL"> + <SpecificVersion>False</SpecificVersion> + <HintPath>..\..\lib\net\2.0\Iesi.Collections.dll</HintPath> + </Reference> <Reference Include="System" /> <Reference Include="System.Core"> <RequiredTargetFramework>3.5</RequiredTargetFramework> @@ -67,9 +71,8 @@ <Compile Include="Util\TypeSystem.cs" /> <Compile Include="Visitors\LocalVariableExpressionReducer.cs" /> <Compile Include="Visitors\NHibernateExpressionVisitor.cs" /> - <Compile Include="Visitors\NHExpressionToSqlQueryTranslator.cs" /> <Compile Include="Visitors\OrderByTransformer.cs" /> - <Compile Include="Visitors\ParameterReplacer.cs" /> + <Compile Include="Visitors\Replacer.cs" /> <Compile Include="Visitors\QuerySpacesFinderVisitor.cs" /> <Compile Include="Visitors\SqlExpressionTranslator.cs" /> <Compile Include="Visitors\NHExpressionToSqlExpressionTransformer.cs" /> Modified: trunk/nhibernate/src/NHibernate.Linq/NHibernateQueryProvider.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Linq/NHibernateQueryProvider.cs 2008-09-19 23:34:29 UTC (rev 3772) +++ trunk/nhibernate/src/NHibernate.Linq/NHibernateQueryProvider.cs 2008-09-20 11:33:47 UTC (rev 3773) @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.Linq.Expressions; using NHibernate.Engine; +using NHibernate.Linq.Query; using NHibernate.Linq.Util; using NHibernate.Linq.Visitors; using NHibernate.SqlCommand; @@ -22,24 +23,9 @@ public override object Execute(Expression expression) { - IList<object> parameterList = new List<object>(); - expression = LocalVariableExpressionReducer.Reduce(expression); - expression = LogicalExpressionReducer.Reduce(expression); - expression = AssociationRewriteVisitor.Rewrite(expression, sessionFactory); - expression = NHExpressionToSqlExpressionTransformer.Transform(sessionFactory, expression); - SqlString sql = SqlExpressionToSqlStringVisitor.Translate(expression, sessionFactory, parameterList); - Console.WriteLine(sql); - throw new NotImplementedException(); - //expression = AssociationVisitor.RewriteWithAssociations(session.SessionFactory, expression); - //expression = CollectionAliasVisitor.AssignCollectionAccessAliases(expression); - //expression = new PropertyToMethodVisitor().Visit(expression); - //expression = new BinaryExpressionOrderer().Visit(expression); - - //once tree is converted to NH tree, pass it to NHibernateQueryTranslator - //which will convert the tree to an NHibernate.SqlCommand.SqlString - - - //return translator.Transform(expression,this.queryOptions); + LinqTranslator translator = new LinqTranslator(expression, sessionFactory); + translator.Translate(); + return translator.List(session as ISessionImplementor); } } } \ No newline at end of file Modified: trunk/nhibernate/src/NHibernate.Linq/Query/LinqTranslator.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Linq/Query/LinqTranslator.cs 2008-09-19 23:34:29 UTC (rev 3772) +++ trunk/nhibernate/src/NHibernate.Linq/Query/LinqTranslator.cs 2008-09-20 11:33:47 UTC (rev 3773) @@ -1,30 +1,85 @@ -using System.Collections.Generic; +using System; +using System.Collections; +using System.Collections.Generic; using System.Linq.Expressions; +using Iesi.Collections.Generic; using NHibernate.Engine; +using NHibernate.Linq.Visitors; using NHibernate.Loader; +using NHibernate.Mapping; +using NHibernate.Persister.Entity; +using NHibernate.SqlCommand; +using NHibernate.Type; +using System.Linq; -namespace NHibernate.Linq.LinqQuery +namespace NHibernate.Linq.Query { - public class LinqTranslator : OuterJoinLoader + public class LinqTranslator : BasicLoader { private readonly Expression expression; private readonly ISessionFactoryImplementor sessionFactory; + private readonly IList<object> parameterList; - public LinqTranslator(Expression expression, - IDictionary<string, IFilter> enabledFilters, - ISessionFactoryImplementor sessionFactory) : base(sessionFactory, enabledFilters) + + public LinqTranslator(Expression expression,ISessionFactoryImplementor sessionFactory) + : base(sessionFactory) + { this.expression = expression; this.sessionFactory = sessionFactory; + this.parameterList = new List<object>(); } + public virtual IType[] ReturnTypes { get; protected set; } public void Translate() { + /*Expression modified = LocalVariableExpressionReducer.Reduce(expression); + modified = LogicalExpressionReducer.Reduce(modified); + modified = AssociationRewriteVisitor.Rewrite(modified, sessionFactory); + modified = NHExpressionToSqlExpressionTransformer.Transform(sessionFactory, modified); + sqlString = SqlExpressionToSqlStringVisitor.Translate(modified, sessionFactory, parameterList);*/ + } + public IList List(ISessionImplementor sessionImplementor) + { + throw new NotImplementedException(); + } + protected override string[] Suffixes + { + get { return suffixes; } + } + private string[] suffixes; - protected void RenderSql() + protected override string[] CollectionSuffixes { + get { return collectionSuffixes; } + } + private string[] collectionSuffixes; + + protected override SqlString SqlString + { + get { return sqlString; } + + } + private SqlString sqlString; + + protected override ILoadable[] EntityPersisters + { + get { return entityPersisters; } + } + private ILoadable[] entityPersisters; + + protected override LockMode[] GetLockModes(IDictionary<string, LockMode> lockModes) + { + return new LockMode[] { LockMode.Read }; + } + + public virtual ISet<string> QuerySpaces + { + get; + protected set; + } } } \ No newline at end of file Modified: trunk/nhibernate/src/NHibernate.Linq/Visitors/AssociationRewriteVisitor.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Linq/Visitors/AssociationRewriteVisitor.cs 2008-09-19 23:34:29 UTC (rev 3772) +++ trunk/nhibernate/src/NHibernate.Linq/Visitors/AssociationRewriteVisitor.cs 2008-09-20 11:33:47 UTC (rev 3773) @@ -1,25 +1,27 @@ -using System.Linq; -using System.Linq.Expressions; +using System.Linq.Expressions; using System.Reflection; +using NHibernate.Engine; using NHibernate.Linq.Expressions; using NHibernate.Linq.Util; using NHibernate.Metadata; +using NHibernate.Persister.Entity; using NHibernate.Type; +using IQueryable=System.Linq.IQueryable; namespace NHibernate.Linq.Visitors { public class AssociationRewriteVisitor : NHibernateExpressionVisitor { - private readonly ISessionFactory sessionFactory; + private readonly ISessionFactoryImplementor sessionFactory; private int aliasOrder; - public AssociationRewriteVisitor(ISessionFactory factory) + public AssociationRewriteVisitor(ISessionFactoryImplementor factory) { sessionFactory = factory; aliasOrder = 0; } - public static Expression Rewrite(Expression expr, ISessionFactory factory) + public static Expression Rewrite(Expression expr, ISessionFactoryImplementor factory) { var visitor = new AssociationRewriteVisitor(factory); expr = visitor.Visit(expr); @@ -66,7 +68,13 @@ protected override Expression VisitConstant(ConstantExpression c) { if (c.Value is IQueryable) - return new QuerySourceExpression((IQueryable) c.Value); + { + var type = c.Value.GetType(); + var elementType = ((IQueryable) c.Value).ElementType; + var loadable = sessionFactory.GetEntityPersister(elementType.FullName) as IOuterJoinLoadable; + return new QuerySourceExpression(type, loadable); + } + return c; } } Modified: trunk/nhibernate/src/NHibernate.Linq/Visitors/NHExpressionToSqlExpressionTransformer.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Linq/Visitors/NHExpressionToSqlExpressionTransformer.cs 2008-09-19 23:34:29 UTC (rev 3772) +++ trunk/nhibernate/src/NHibernate.Linq/Visitors/NHExpressionToSqlExpressionTransformer.cs 2008-09-20 11:33:47 UTC (rev 3773) @@ -45,7 +45,7 @@ string alias = parameter.Name; System.Type type = lambda.Body.Type; System.Type resultType = typeof (IQueryable<>).MakeGenericType(type); - return new SelectExpression(resultType, alias, body, source, null); + return new SelectExpression(resultType, alias, body, source,null,null); } protected Expression TransformWhereCall(MethodCallExpression expr) @@ -59,7 +59,7 @@ string alias = parameter.Name; System.Type type = body.Type; System.Type resultType = typeof (IQueryable<>).MakeGenericType(type); - return new SelectExpression(resultType, alias, null, source, body); + return new SelectExpression(resultType, alias, null, source, body,null); } protected override Expression VisitQuerySource(QuerySourceExpression expr) @@ -67,7 +67,6 @@ return expr; } - protected override Expression VisitBinary(BinaryExpression b) { switch (b.NodeType) Deleted: trunk/nhibernate/src/NHibernate.Linq/Visitors/NHExpressionToSqlQueryTranslator.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Linq/Visitors/NHExpressionToSqlQueryTranslator.cs 2008-09-19 23:34:29 UTC (rev 3772) +++ trunk/nhibernate/src/NHibernate.Linq/Visitors/NHExpressionToSqlQueryTranslator.cs 2008-09-20 11:33:47 UTC (rev 3773) @@ -1,28 +0,0 @@ -using System.Linq.Expressions; -using NHibernate.Linq.Expressions; -using NHibernate.SqlCommand; - -namespace NHibernate.Linq.Visitors -{ - public class NHExpressionToSqlQueryTranslator : NHibernateExpressionVisitor - { - protected SqlStringBuilder sqlStringBuilder; - - public SqlString Translate(Expression expression) - { - sqlStringBuilder = new SqlStringBuilder(); - Visit(expression); - return sqlStringBuilder.ToSqlString(); - } - - protected override Expression VisitSelect(SelectExpression select) - { - return select; - } - - protected override Expression VisitMethodCall(MethodCallExpression m) - { - return base.VisitMethodCall(m); - } - } -} \ No newline at end of file Modified: trunk/nhibernate/src/NHibernate.Linq/Visitors/NHibernateExpressionVisitor.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Linq/Visitors/NHibernateExpressionVisitor.cs 2008-09-19 23:34:29 UTC (rev 3772) +++ trunk/nhibernate/src/NHibernate.Linq/Visitors/NHibernateExpressionVisitor.cs 2008-09-20 11:33:47 UTC (rev 3773) @@ -1,6 +1,7 @@ -using System.Linq.Expressions; +using System.Collections.ObjectModel; +using System.Linq.Expressions; using NHibernate.Linq.Expressions; - +using System.Linq; namespace NHibernate.Linq.Visitors { /// <summary> @@ -55,11 +56,12 @@ Expression from = VisitSource(select.From); Expression where = Visit(select.Where); Expression projection = Visit(select.Projection); + ReadOnlyCollection<Expression> orderbys = VisitList(select.OrderBys); if (from != select.From || where != select.Where) { - return new SelectExpression(select.Type, select.FromAlias, projection, from, where); + return new SelectExpression(select.Type, select.FromAlias, projection, from, where, orderbys); } - else + else return select; } Deleted: trunk/nhibernate/src/NHibernate.Linq/Visitors/ParameterReplacer.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Linq/Visitors/ParameterReplacer.cs 2008-09-19 23:34:29 UTC (rev 3772) +++ trunk/nhibernate/src/NHibernate.Linq/Visitors/ParameterReplacer.cs 2008-09-20 11:33:47 UTC (rev 3773) @@ -1,22 +0,0 @@ -using System.Collections.Generic; -using System.Linq.Expressions; - -namespace NHibernate.Linq.Visitors -{ - public class ParameterReplacer : ExpressionVisitor - { - private readonly Dictionary<ParameterExpression, ParameterExpression> parameterReplacements; - - public ParameterReplacer(Dictionary<ParameterExpression, ParameterExpression> parameterReplacements) - { - this.parameterReplacements = parameterReplacements; - } - - protected override Expression VisitParameter(ParameterExpression p) - { - if (parameterReplacements.ContainsKey(p)) - return parameterReplacements[p]; - return p; - } - } -} \ No newline at end of file Copied: trunk/nhibernate/src/NHibernate.Linq/Visitors/Replacer.cs (from rev 3770, trunk/nhibernate/src/NHibernate.Linq/Visitors/ParameterReplacer.cs) =================================================================== --- trunk/nhibernate/src/NHibernate.Linq/Visitors/Replacer.cs (rev 0) +++ trunk/nhibernate/src/NHibernate.Linq/Visitors/Replacer.cs 2008-09-20 11:33:47 UTC (rev 3773) @@ -0,0 +1,21 @@ +using System.Collections.Generic; +using System.Linq.Expressions; + +namespace NHibernate.Linq.Visitors +{ + public class Replacer : ExpressionVisitor + { + private readonly Dictionary<Expression, Expression> replacements; + + public Replacer(Dictionary<Expression, Expression> replacements) + { + this.replacements = replacements; + } + public override Expression Visit(Expression exp) + { + if (replacements.ContainsKey(exp)) + return replacements[exp]; + return base.Visit(exp); + } + } +} \ No newline at end of file Property changes on: trunk/nhibernate/src/NHibernate.Linq/Visitors/Replacer.cs ___________________________________________________________________ Added: svn:mergeinfo + Modified: trunk/nhibernate/src/NHibernate.Linq/Visitors/SqlExpressionTranslator.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Linq/Visitors/SqlExpressionTranslator.cs 2008-09-19 23:34:29 UTC (rev 3772) +++ trunk/nhibernate/src/NHibernate.Linq/Visitors/SqlExpressionTranslator.cs 2008-09-20 11:33:47 UTC (rev 3773) @@ -123,7 +123,7 @@ protected override Expression VisitConstant(ConstantExpression c) { - sqlStringBuilder.AddParameter(); + sqlStringBuilder.Add(Parameter.Placeholder); parameterList.Add(c.Value); return c; } @@ -138,52 +138,10 @@ protected override Expression VisitSelect(SelectExpression select) { - var selectBuilder = new SqlSelectBuilder(sessionFactory); - var selectString = new SqlString("*"); - SqlString fromString = Translate(select.From, sessionFactory, parameterList); - fromString = new SqlString("(", fromString, ")"); - SqlString whereString = Translate(select.Where, sessionFactory, parameterList); - var outerJoinsAfterFrom = new SqlString(); - var outerJoinsAfterWhere = new SqlString(); - selectBuilder.SetFromClause(fromString); - selectBuilder.SetWhereClause(whereString); - selectBuilder.SetSelectClause(selectString); - selectBuilder.SetOuterJoins(outerJoinsAfterFrom, outerJoinsAfterWhere); - sqlStringBuilder.Add(selectBuilder.ToSqlString()); - return select; + throw new NotImplementedException(); } - protected override Expression VisitQuerySource(QuerySourceExpression expr) - { - sqlStringBuilder.Add("SELECT "); - IClassMetadata metadata = sessionFactory.GetClassMetadata(expr.Query.ElementType); - var mapping = (IPropertyMapping) sessionFactory.GetEntityPersister(metadata.EntityName); - string[] names = metadata.PropertyNames; - - bool started = false; - for (int i = 0; i < names.Length; i++) - { - string name = names[i]; - IType propertyType = metadata.GetPropertyType(name); - if (!(propertyType.IsComponentType | - propertyType.IsCollectionType | - propertyType.IsAssociationType | - propertyType.IsAnyType)) - { - if (started) - sqlStringBuilder.Add(", "); - started = true; - sqlStringBuilder.Add(mapping.ToColumns(name)[0]); - sqlStringBuilder.Add(" AS "); - sqlStringBuilder.Add(name); - } - } - sqlStringBuilder.Add(" FROM "); - sqlStringBuilder.Add(expr.Query.ElementType.Name); - return base.VisitQuerySource(expr); - } - public override string ToString() { return sqlStringBuilder.ToString(); Modified: trunk/nhibernate/src/NHibernate.Linq/Visitors/WhereExpressionCombiner.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Linq/Visitors/WhereExpressionCombiner.cs 2008-09-19 23:34:29 UTC (rev 3772) +++ trunk/nhibernate/src/NHibernate.Linq/Visitors/WhereExpressionCombiner.cs 2008-09-20 11:33:47 UTC (rev 3773) @@ -14,7 +14,7 @@ if (IsWhereCall(m)) { var stack = new Stack<Expression>(); - var parameterReplacements = new Dictionary<ParameterExpression, ParameterExpression>(); + var parameterReplacements = new Dictionary<Expression, Expression>(); Expression source = m.Arguments[0]; var outerLambda = LinqUtil.StripQuotes(m.Arguments[1]) as LambdaExpression; @@ -38,7 +38,7 @@ } source = Visit(source); LambdaExpression resultingLambda = Expression.Lambda(expr, replacementParameter); - var parameterReplacer = new ParameterReplacer(parameterReplacements); + var parameterReplacer = new Replacer(parameterReplacements); resultingLambda = parameterReplacer.Visit(resultingLambda) as LambdaExpression; return Expression.Call(null, m.Method, source, resultingLambda); } Modified: trunk/nhibernate/src/NHibernate.Linq.Test/NHibernate.Linq.Test.csproj =================================================================== --- trunk/nhibernate/src/NHibernate.Linq.Test/NHibernate.Linq.Test.csproj 2008-09-19 23:34:29 UTC (rev 3772) +++ trunk/nhibernate/src/NHibernate.Linq.Test/NHibernate.Linq.Test.csproj 2008-09-20 11:33:47 UTC (rev 3773) @@ -20,7 +20,7 @@ <DefineConstants>DEBUG;TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> - <TreatWarningsAsErrors>true</TreatWarningsAsErrors> + <TreatWarningsAsErrors>false</TreatWarningsAsErrors> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>none</DebugType> Modified: trunk/nhibernate/src/NHibernate.Linq.Test/VisitorTests/OrderTransformerTests.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Linq.Test/VisitorTests/OrderTransformerTests.cs 2008-09-19 23:34:29 UTC (rev 3772) +++ trunk/nhibernate/src/NHibernate.Linq.Test/VisitorTests/OrderTransformerTests.cs 2008-09-20 11:33:47 UTC (rev 3773) @@ -1,4 +1,5 @@ -using System.Linq; +using System; +using System.Linq; using System.Linq.Expressions; using NHibernate.Linq.Test.Model; using NHibernate.Linq.Visitors; @@ -17,6 +18,7 @@ select a; OrderByTransformer transformer = new OrderByTransformer(); Expression expr=transformer.Visit(query.Expression); + Console.WriteLine(expr); } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |