title: Hibernate query returning error
body: <p>I have the following hibernate query - </p>
  
  <pre><code>    events = (List&lt;Event&gt;)session.createQuery(
              "Event where eventName like " 
              + "\"" + event.getEventName() 
              + "\"" +
              " and startingDate &gt;=   "
              + "\"" + 
              event.getStartingDate() 
              + "\" " +
              " and endingDate &lt;=  " 
              + "\"" + 
              event.getEndingDate()
              + "\" "
              ).list();
  </code></pre>
  
  <p>But it returns the error - </p>
  
  <p>org.hibernate.QueryException: unexpected char: '"' [Event where eventName like "test" and startingDate >=   "2011-01-19"  and endingDate &lt;=  "2011-01-31" ]
      at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:227)
      at org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:134)
      at org.hibernate.engine.query.HQLQueryPlan.(HQLQueryPlan.java:101)
      at org.hibernate.engine.query.HQLQueryPlan.(HQLQueryPlan.java:80)</p>
  
  <p>Seems to be saying it does'nt like a " somewhere ?</p>
  
  <p>It worked fine until I added the date fields to the where clause.</p>
  
  <p>Thanks</p>