Hi guys.

I'm trying to implement some NodaTime mapping support for NH.
This is in a proof-of-concept state now, but there's already a Nuget
package, NHibernate.NodaTime. You can check it out.
Here's one of the first roadblocks I've found: when trying to query using
LINQ aggregate methods, I run into the following exception:

System.NotSupportedException : Don't currently support idents of type
LocalDate
   at NHibernate.Hql.Ast.HqlIdent..ctor(IASTFactory factory, Type type)
   at NHibernate.Hql.Ast.HqlCast..ctor(IASTFactory factory, HqlExpression
expression, Type type)
   at NHibernate.Hql.Ast.HqlTreeBuilder.Cast(HqlExpression expression, Type
type)
   at
NHibernate.Linq.Visitors.HqlGeneratorExpressionTreeVisitor.VisitNhMax(NhMaxExpression
expression)
   at
NHibernate.Linq.Visitors.HqlGeneratorExpressionTreeVisitor.VisitExpression(Expression
expression)
   at
NHibernate.Linq.Visitors.HqlGeneratorExpressionTreeVisitor.Visit(Expression
expression)
   at
NHibernate.Linq.Visitors.SelectClauseVisitor.VisitExpression(Expression
expression)
   at NHibernate.Linq.Visitors.SelectClauseVisitor.Visit(Expression
expression)
   at
NHibernate.Linq.Visitors.QueryModelVisitor.VisitSelectClause(SelectClause
selectClause, QueryModel queryModel)
   at Remotion.Linq.Clauses.SelectClause.Accept(IQueryModelVisitor visitor,
QueryModel queryModel)
   at Remotion.Linq.QueryModelVisitorBase.VisitQueryModel(QueryModel
queryModel)
   at NHibernate.Linq.Visitors.QueryModelVisitor.Visit()
   at
NHibernate.Linq.Visitors.QueryModelVisitor.GenerateHqlQuery(QueryModel
queryModel, VisitorParameters parameters, Boolean root)
   at NHibernate.Linq.NhLinqExpression.Translate(ISessionFactoryImplementor
sessionFactory)
   at
NHibernate.Hql.Ast.ANTLR.ASTQueryTranslatorFactory.CreateQueryTranslators(String
queryIdentifier, IQueryExpression queryExpression, String collectionRole,
Boolean shallow, IDictionary`2 filters, ISessionFactoryImplementor factory)
   at
NHibernate.Engine.Query.HQLExpressionQueryPlan.CreateTranslators(String
expressionStr, IQueryExpression queryExpression, String collectionRole,
Boolean shallow, IDictionary`2 enabledFilters, ISessionFactoryImplementor
factory)
   at NHibernate.Engine.Query.HQLExpressionQueryPlan..ctor(String
expressionStr, IQueryExpression queryExpression, String collectionRole,
Boolean shallow, IDictionary`2 enabledFilters, ISessionFactoryImplementor
factory)
   at NHibernate.Engine.Query.HQLExpressionQueryPlan..ctor(String
expressionStr, IQueryExpression queryExpression, Boolean shallow,
IDictionary`2 enabledFilters, ISessionFactoryImplementor factory)
   at
NHibernate.Engine.Query.QueryPlanCache.GetHQLQueryPlan(IQueryExpression
queryExpression, Boolean shallow, IDictionary`2 enabledFilters)
   at NHibernate.Impl.AbstractSessionImpl.GetHQLQueryPlan(IQueryExpression
queryExpression, Boolean shallow)
   at NHibernate.Impl.AbstractSessionImpl.CreateQuery(IQueryExpression
queryExpression)
   at NHibernate.Linq.DefaultQueryProvider.PrepareQuery(Expression
expression, ref IQuery query, ref NhLinqExpression nhQuery)
   at NHibernate.Linq.DefaultQueryProvider.Execute(Expression expression)
   at NHibernate.Linq.DefaultQueryProvider.Execute(Expression expression)
   at System.Linq.Queryable.Max(IQueryable`1 source, Expression`1 selector)
   at [my code]

It looks like the Hql Ast generation fails for anything that is not a
native type.
Is there a workaround from the Linq side (generators) or do I have to patch
the core?

Thanks!
Diego

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"nhibernate-development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to