New ANTLR parser fails on computable properties
Description
Environment
Attachments
Activity
Oskar Berggren November 12, 2012 at 8:36 PM
I've added the test to master (bf29f9d4ab000f1ed70d77ef273a402e1451aee5). The test succeeds without any changes, so probably this has been fixed already or there was some other issue.
Fabio Maulo June 9, 2009 at 11:43 AM
Thanks for the test.
Artem Tikhomirov June 9, 2009 at 11:27 AM
Why so mean, man? You've broke up with your wife or something? I'm just trying to help. I'm not requesting support or help from anybody. Is this a shame for a human being not to post a ton of comments to the mailing list per day like you do?
Artem Tikhomirov June 9, 2009 at 11:23 AM
Test case to reproduce an error. Libs excluded, but it's a Beta1, not Alpha3
Fabio Maulo June 9, 2009 at 8:33 AM
I'm insist sure.
So the result piece of SQL should look like
(start_date < (now()-'24:00'::time)) == false
Using your concept I'm the owner of more than 85% of the code but I never feel it. Implement your opinions in your project not here, please.
Instead spent time to write opinions here please provide something useful to recreate the issue.
Hello.
We have following property on Conference class:
<property name="IsOutdated" formula="(start_date<(now()-'24:00'::time))" />
HQL query on it falls with following stack trace:
at System.ThrowHelper.ThrowKeyNotFoundException()
at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
at NHibernate.Hql.Ast.ANTLR.Util.LiteralProcessor.ProcessBoolean(IASTNode constant)
at NHibernate.Hql.Ast.ANTLR.HqlSqlWalker.constant()
at NHibernate.Hql.Ast.ANTLR.HqlSqlWalker.expr()
at NHibernate.Hql.Ast.ANTLR.HqlSqlWalker.exprOrSubquery()
at NHibernate.Hql.Ast.ANTLR.HqlSqlWalker.comparisonExpr()
at NHibernate.Hql.Ast.ANTLR.HqlSqlWalker.logicalExpr()
at NHibernate.Hql.Ast.ANTLR.HqlSqlWalker.logicalExpr()
at NHibernate.Hql.Ast.ANTLR.HqlSqlWalker.whereClause()
at NHibernate.Hql.Ast.ANTLR.HqlSqlWalker.query()
at NHibernate.Hql.Ast.ANTLR.HqlSqlWalker.selectStatement()
at NHibernate.Hql.Ast.ANTLR.HqlSqlWalker.statement()
at NHibernate.Hql.Ast.ANTLR.HqlSqlTranslator.Translate()
at NHibernate.Hql.Ast.ANTLR.QueryTranslatorImpl.Analyze(HqlParseEngine parser, String collectionRole)
at NHibernate.Hql.Ast.ANTLR.QueryTranslatorImpl.DoCompile(IDictionary`2 replacements, Boolean shallow, String collectionRole)
at NHibernate.Engine.Query.HQLQueryPlan..ctor(String hql, String collectionRole, Boolean shallow, IDictionary`2 enabledFilters, ISessionFactoryImplementor factory)
at NHibernate.Engine.Query.HQLQueryPlan..ctor(String hql, Boolean shallow, IDictionary`2 enabledFilters, ISessionFactoryImplementor factory)
at NHibernate.Engine.Query.QueryPlanCache.GetHQLQueryPlan(String queryString, Boolean shallow, IDictionary`2 enabledFilters)
at NHibernate.Impl.AbstractSessionImpl.GetHQLQueryPlan(String query, Boolean shallow)
at NHibernate.Impl.AbstractSessionImpl.CreateQuery(String queryString)