title: NHibernate QuerySyntaxException
body: <p>I am following along with the <a href="http://www.summerofnhibernate.com/" rel="noreferrer">Summer of NHibernate Screencast Series</a> and am running into a strange NHibernate Exception.</p>
  
  <pre><code>NHibernate.Hql.Ast.ANTLR.QuerySyntaxException:
  Exception of type
  'Antlr.Runtime.NoViableAltException' was thrown.
  [select from DataTransfer.Person p where p.FirstName=:fn].
  </code></pre>
  
  <p>I have deviated from the Screencast Series in the following ways:</p>
  
  <ol>
  <li>Running against an MS SQL Server Compact Database</li>
  <li>I am using MSTest instead of MbUnit</li>
  </ol>
  
  <p>I've tried any number of combination of queries always with the same result. My present CreateQuery syntax</p>
  
  <pre><code>public IList&lt;Person&gt; GetPersonsByFirstName(string firstName)
  {
      ISession session = GetSession();
  
      return session.CreateQuery("select from Person p " +
          "where p.FirstName=:fn").SetString("fn", firstName)
          .List&lt;Person&gt;();
  }
  </code></pre>
  
  <p>While not a direct query this method works</p>
  
  <pre><code>public Person GetPersonById(int personId)
  {
      ISession session = GetSession();
      return session.Get&lt;Person&gt;(personId);
  }
  </code></pre>
  
  <p>My <em>hibernate.cfg.xml</em></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt;
  &lt;hibernate-configuration xmlns="urn:nhibernate-configuration-2.2"&gt;
    &lt;session-factory name="BookDb"&gt;
      &lt;property name="connection.provider"&gt;NHibernate.Connection.DriverConnectionProvider&lt;/property&gt;
      &lt;property name="connection.driver_class"&gt;NHibernate.Driver.SqlServerCeDriver&lt;/property&gt;
      &lt;property name="dialect"&gt;NHibernate.Dialect.MsSqlCeDialect&lt;/property&gt;
      &lt;property name="connection.connection_string"&gt;Data Source=C:\Code\BookCollection\DataAccessLayer\BookCollectionDb.sdf&lt;/property&gt;
      &lt;property name="show_sql"&gt;true&lt;/property&gt;
      &lt;property name="proxyfactory.factory_class"&gt;NHibernate.ByteCode.Castle.ProxyFactoryFactory, NHibernate.ByteCode.Castle&lt;/property&gt;
      &lt;mapping assembly="DataTransfer"/&gt;
    &lt;/session-factory&gt;
  &lt;/hibernate-configuration&gt;
  </code></pre>
  
  <p><em>Person.hbm.xml</em></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt;
  &lt;hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" assembly="DataTransfer" namespace="DataTransfer"&gt;
    &lt;class name="DataTransfer.Person,DataTransfer" table="Person"&gt;
      &lt;id name="PersonId" column="PersonId" type="Int32" unsaved-value="0"&gt;
        &lt;generator class="native"/&gt;
      &lt;/id&gt;
      &lt;property name="FirstName" column="FirstName" type="String" length="50" not-null="false" /&gt;
      &lt;property name="LastName" column="LastName" type="String" length="50" not-null="false" /&gt;
    &lt;/class&gt;
  &lt;/hibernate-mapping&gt;
  </code></pre>