title: How to remove Hibernate deprecation warning message
body: <p>We have a query:</p>
  
  <pre><code> List&lt;Book&gt; books = session.createQuery(
         "from Book b where :x member of b.bookCategories")
         .setParameter("x", crimeStory)
         .list();
  </code></pre>
  
  <p>But when executing this query, we got a warning message:</p>
  
  <blockquote>
    <p>WARN  10:19:41 deprecation: HHH90000016: Found use of deprecated
    'collection     property' syntax in HQL/JPQL query [null.elements];
    use collection function     syntax instead [elements(null)].</p>
  </blockquote>
  
  <p>I tried to change the query to:</p>
  
  <pre><code>List&lt;Book&gt; books = session.createQuery(
      "from Book b where ? in elements(b.bookCategories)")
      .setParameter(0, crimeStory).list();
  </code></pre>
  
  <p>but the warning message was still there.</p>
  
  <p>Please help me to fix this warning.</p>
  
  <p>P/s: We are currently using Hibernate 5.0.2</p>