Hi.

I have now updated to NHibernate 3.0. But there is the first problem
now. I use the fallowing Linq:

return (from element in Session.Query<User>()
                    where element.UserName.Equals(userName,
StringComparison.CurrentCultureIgnoreCase)
                    select element).SingleOrDefault();

This is not working anymore with NHibernate 3. It has worked with 2.1.

Here is the Exception:

Csla.DataPortalException: DataPortal.Fetch fehlgeschlagen (Boolean
Equals(System.String, System.StringComparison)) --->
Csla.Reflection.CallMethodException: DataPortal_Fetch Methodenaufruf
fehlgeschlagen ---> System.NotSupportedException: Boolean
Equals(System.String, System.StringComparison)
   bei
NHibernate.Linq.Visitors.HqlGeneratorExpressionTreeVisitor.VisitMethodCallExpression(MethodCallExpression
expression) in d:\CSharp\NH\nhibernate\src\NHibernate\Linq\Visitors
\HqlGeneratorExpressionTreeVisitor.cs:Zeile 396.
   bei
NHibernate.Linq.Visitors.HqlGeneratorExpressionTreeVisitor.VisitExpression(Expression
expression) in d:\CSharp\NH\nhibernate\src\NHibernate\Linq\Visitors
\HqlGeneratorExpressionTreeVisitor.cs:Zeile 92.
   bei
NHibernate.Linq.Visitors.HqlGeneratorExpressionTreeVisitor.Visit(Expression
expression, VisitorParameters parameters) in d:\CSharp\NH\nhibernate
\src\NHibernate\Linq\Visitors
\HqlGeneratorExpressionTreeVisitor.cs:Zeile 21.
   bei
NHibernate.Linq.Visitors.QueryModelVisitor.VisitWhereClause(WhereClause
whereClause, QueryModel queryModel, Int32 index) in d:\CSharp\NH
\nhibernate\src\NHibernate\Linq\Visitors\QueryModelVisitor.cs:Zeile
156.
   bei
Remotion.Data.Linq.Clauses.WhereClause.Accept(IQueryModelVisitor
visitor, QueryModel queryModel, Int32 index)
   bei
Remotion.Data.Linq.QueryModelVisitorBase.VisitBodyClauses(ObservableCollection`1
bodyClauses, QueryModel queryModel)
   bei
Remotion.Data.Linq.QueryModelVisitorBase.VisitQueryModel(QueryModel
queryModel)
   bei
NHibernate.Linq.Visitors.QueryModelVisitor.GenerateHqlQuery(QueryModel
queryModel, VisitorParameters parameters, Boolean root) in d:\CSharp\NH
\nhibernate\src\NHibernate\Linq\Visitors\QueryModelVisitor.cs:Zeile
49.
   bei
NHibernate.Linq.NhLinqExpression.Translate(ISessionFactoryImplementor
sessionFactory) in d:\CSharp\NH\nhibernate\src\NHibernate\Linq
\NhLinqExpression.cs:Zeile 67.
   bei
NHibernate.Hql.Ast.ANTLR.ASTQueryTranslatorFactory.CreateQueryTranslators(String
queryIdentifier, IQueryExpression queryExpression, String
collectionRole, Boolean shallow, IDictionary`2 filters,
ISessionFactoryImplementor factory) in d:\CSharp\NH\nhibernate\src
\NHibernate\Hql\Ast\ANTLR\ASTQueryTranslatorFactory.cs:Zeile 27.
   bei
NHibernate.Engine.Query.HQLExpressionQueryPlan.CreateTranslators(String
expressionStr, IQueryExpression queryExpression, String
collectionRole, Boolean shallow, IDictionary`2 enabledFilters,
ISessionFactoryImplementor factory) in d:\CSharp\NH\nhibernate\src
\NHibernate\Engine\Query\HQLExpressionQueryPlan.cs:Zeile 34.
   bei NHibernate.Engine.Query.HQLExpressionQueryPlan..ctor(String
expressionStr, IQueryExpression queryExpression, String
collectionRole, Boolean shallow, IDictionary`2 enabledFilters,
ISessionFactoryImplementor factory) in d:\CSharp\NH\nhibernate\src
\NHibernate\Engine\Query\HQLExpressionQueryPlan.cs:Zeile 23.
   bei
NHibernate.Engine.Query.QueryPlanCache.GetHQLQueryPlan(IQueryExpression
queryExpression, Boolean shallow, IDictionary`2 enabledFilters) in d:
\CSharp\NH\nhibernate\src\NHibernate\Engine\Query
\QueryPlanCache.cs:Zeile 88.
   bei
NHibernate.Impl.AbstractSessionImpl.GetHQLQueryPlan(IQueryExpression
queryExpression, Boolean shallow) in d:\CSharp\NH\nhibernate\src
\NHibernate\Impl\AbstractSessionImpl.cs:Zeile 302.
   bei
NHibernate.Impl.AbstractSessionImpl.CreateQuery(IQueryExpression
queryExpression) in d:\CSharp\NH\nhibernate\src\NHibernate\Impl
\AbstractSessionImpl.cs:Zeile 258.
   bei NHibernate.Linq.NhQueryProvider.PrepareQuery(Expression
expression, IQuery& query, NhLinqExpression& nhQuery) in d:\CSharp\NH
\nhibernate\src\NHibernate\Linq\NhQueryProvider.cs:Zeile 42.
   bei NHibernate.Linq.NhQueryProvider.Execute(Expression expression)
in d:\CSharp\NH\nhibernate\src\NHibernate\Linq
\NhQueryProvider.cs:Zeile 22.
   bei NHibernate.Linq.NhQueryProvider.Execute[TResult](Expression
expression) in d:\CSharp\NH\nhibernate\src\NHibernate\Linq
\NhQueryProvider.cs:Zeile 101.
   bei System.Linq.Queryable.SingleOrDefault[TSource](IQueryable`1
source)

Can someone help me, whats going wrong? - Thank you very much.

Best Regards, Thomas

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en.

Reply via email to