Thanks. Now the problem is that NH can't find ReceivedFax implementation nor its mappings.
If you want we can continue joking but perhaps would be better if you try something better to solve *your* issue. On Mon, Dec 13, 2010 at 2:16 PM, Aaron Boxer <[email protected]> wrote: > Sorry, I should have submitted a test at the beginning: > > > > [Test] > public void NH_HQL_ANTLR_TEST() > { > // Only to test the parser > using (ISession s = OpenSession()) > { > var hql = "select distinct fm from ReceivedFax f" > + " join f.ReceivingFaxMachine fm " > + " where fm.Deactivated = :deactivated" > + " and f.Status in (:new, :detached)"; > > var query = s.CreateQuery(hql); > } > } > > > > > On Mon, Dec 13, 2010 at 11:52 AM, Fabio Maulo <[email protected]> > wrote: > > I wrote exactly this: > > session.CreateQuery("select distinct fm from ReceivedFax f join > > f.ReceivingFaxMachine fm where fm.Deactivated = :deactivated and > > f.Status in (:new, :detached)" ); > > inside random text editors, but the C# compiler I have in my machine > can't > > compile it. > > can you send something compilable to recreate that message ? > > Thanks. > > > > On Mon, Dec 13, 2010 at 1:42 PM, Aaron Boxer <[email protected]> wrote: > >> > >> Thanks, Fabio. Do you mean to locate which column in the string ANTRL > >> is choking on? > >> Because, I can't determine this from the stack trace. > >> > >> I hope I am not misunderstanding, but to reproduce, the following line > >> will work: > >> > >> session.CreateQuery("select distinct fm from ReceivedFax f join > >> f.ReceivingFaxMachine fm where fm.Deactivated = :deactivated and > >> f.Status in (:new, :detached)" ); > >> > >> > >> > >> > >> On Mon, Dec 13, 2010 at 11:15 AM, Fabio Maulo <[email protected]> > >> wrote: > >> > can you something to recreate that message ? > >> > it should contain line and column of the string. > >> > > >> > On Mon, Dec 13, 2010 at 12:36 PM, Aaron Boxer <[email protected]> > wrote: > >> >> > >> >> Here it is: > >> >> > >> >> $exception {"Exception of type > >> >> 'Antlr.Runtime.MismatchedTokenException' was > >> >> thrown."} System.Exception > >> >> {Antlr.Runtime.MismatchedTokenException} > >> >> > >> >> > >> >> > >> >> > >> >> On Sat, Dec 11, 2010 at 6:36 AM, Fabio Maulo <[email protected]> > >> >> wrote: > >> >> > which is the full message of the exception ? > >> >> > without stack trace. > >> >> > Thanks. > >> >> > > >> >> > On Fri, Dec 10, 2010 at 10:46 PM, Aaron Boxer <[email protected]> > >> >> > wrote: > >> >> >> > >> >> >> Here are the last few lines of the exception stack trace: > >> >> >> > >> >> >> > >> >> >> > >> >> >> > >> >> >> > >> >> >> > NHibernate.Hql.Ast.ANTLR.HqlParser.RecoverFromMismatchedToken(Antlr.Runtime > >> >> >> .IIntStream > >> >> >> input = > >> >> >> > >> >> >> > >> >> >> > >> >> >> > {selectdistinctfmfromReceivedFaxfjoinf.ReceivingFaxMachinefmwherefm.Deactiv > >> >> >> ated=:deactivatedandf.Statusin(:new,:detached)}, > >> >> >> int ttype = 123, Antlr.Runtime.BitSet follow = {1}) Line 111 + > 0x31 > >> >> >> bytes C# > >> >> >> [External Code] > >> >> >> > >> >> >> NHibernate.dll!NHibernate.Hql.Ast.ANTLR.HqlParser.identifier() > >> >> >> Line > >> >> >> 10715 + 0x35 bytes C# > >> >> >> NHibernate.dll! > >> >> >> NHibernate.Hql.Ast.ANTLR.HqlParser.primaryExpression() Line 8658 + > >> >> >> 0xc > >> >> >> bytes C# > >> >> >> NHibernate.dll!NHibernate.Hql.Ast.ANTLR.HqlParser.atom() > Line > >> >> >> 8367 > >> >> >> + > >> >> >> 0xc bytes C# > >> >> >> > >> >> >> > NHibernate.dll!NHibernate.Hql.Ast.ANTLR.HqlParser.unaryExpression() > >> >> >> Line 7478 + 0xc bytes C# > >> >> >> NHibernate.dll! > >> >> >> NHibernate.Hql.Ast.ANTLR.HqlParser.multiplyExpression() Line 7108 > + > >> >> >> 0xc bytes C# > >> >> >> > >> >> >> > >> >> >> Thanks, > >> >> >> Aaron > >> >> >> > >> >> >> > >> >> >> On Fri, Dec 10, 2010 at 5:47 PM, Fabio Maulo < > [email protected]> > >> >> >> wrote: > >> >> >> > which is the full message of the exception ? > >> >> >> > > >> >> >> > On Fri, Dec 10, 2010 at 6:45 PM, Aaron Boxer <[email protected] > > > >> >> >> > wrote: > >> >> >> >> > >> >> >> >> var hql = "select distinct fm from ReceivedFax f" > >> >> >> >> + " join f.ReceivingFaxMachine > fm > >> >> >> >> " > >> >> >> >> + " where fm.Deactivated = > >> >> >> >> :deactivated" > >> >> >> >> + " and f.Status in (:new, > >> >> >> >> :detached)"; > >> >> >> >> > >> >> >> >> > >> >> >> >> It's causing the ANTLR HQL parser to choke with a mismatched > >> >> >> >> token > >> >> >> >> error. > >> >> >> >> > >> >> >> >> Thanks, > >> >> >> >> Aaron > >> >> >> >> > >> >> >> >> -- > >> >> >> >> 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]<nhusers%[email protected]> > . > >> >> >> >> For more options, visit this group at > >> >> >> >> http://groups.google.com/group/nhusers?hl=en. > >> >> >> >> > >> >> >> > > >> >> >> > > >> >> >> > > >> >> >> > -- > >> >> >> > Fabio Maulo > >> >> >> > > >> >> >> > -- > >> >> >> > 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]<nhusers%[email protected]> > . > >> >> >> > For more options, visit this group at > >> >> >> > http://groups.google.com/group/nhusers?hl=en. > >> >> >> > > >> >> >> > >> >> >> -- > >> >> >> 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]<nhusers%[email protected]> > . > >> >> >> For more options, visit this group at > >> >> >> http://groups.google.com/group/nhusers?hl=en. > >> >> >> > >> >> > > >> >> > > >> >> > > >> >> > -- > >> >> > Fabio Maulo > >> >> > > >> >> > -- > >> >> > 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]<nhusers%[email protected]> > . > >> >> > For more options, visit this group at > >> >> > http://groups.google.com/group/nhusers?hl=en. > >> >> > > >> >> > >> >> -- > >> >> 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]<nhusers%[email protected]> > . > >> >> For more options, visit this group at > >> >> http://groups.google.com/group/nhusers?hl=en. > >> >> > >> > > >> > > >> > > >> > -- > >> > Fabio Maulo > >> > > >> > -- > >> > 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]<nhusers%[email protected]> > . > >> > For more options, visit this group at > >> > http://groups.google.com/group/nhusers?hl=en. > >> > > >> > >> -- > >> 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]<nhusers%[email protected]> > . > >> For more options, visit this group at > >> http://groups.google.com/group/nhusers?hl=en. > >> > > > > > > > > -- > > Fabio Maulo > > > > -- > > 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]<nhusers%[email protected]> > . > > For more options, visit this group at > > http://groups.google.com/group/nhusers?hl=en. > > > > -- > 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]<nhusers%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/nhusers?hl=en. > > -- Fabio Maulo -- 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.
