.net - Why Nhibernate cannot create this simple query for me? -
I do not understand why this simple query has not been created. I call this method through a test and It throws an exception to the complaint about line 1, column 7, where I do not see anything wrong.
Public IList & lt; Continent & gt; GetContinentByName (string name) {eSession session = GetSession (); IQuery query = session.CreateQuery ("Choose from continent where Continent. Continent short = 'Atlantis');
I get an Antillar exception below
TestCase 'M: DataEnvestileError.HibernetProvor.GetCentinfoNubname (system string)' failed: 'Antial Runtime. Exception of Caribbean Estepation' was thrown. Near Line 1, column 7 NHibernate.Hql.Ast.antLR.QuerySyntaxException: 'Antlr.Runtime.NoViableAltException' threw the exception of type
session.CreateQuery expexts a HQL query, like this: sess.CreateQuery (" DomesticCat cat where cat.Name in (namesList) ");
session.CreateSQLQuery ("select {cat. Cat} {cat} where ROWNUM <10" See Nibernate Docs for more information
P>
Comments
Post a Comment