title: Using Postgres JSONB query with Spring Data and bind parameter fails with InvalidDataAccessApiUsageException
body: <p>I am currently looking for a solution for the exception</p>
  
  <pre><code>org.springframework.dao.InvalidDataAccessApiUsageException: Parameter with that position [1] did not exist;
  </code></pre>
  
  <p>My current <code>@Query</code> annotation is:</p>
  
  <pre><code>@Query(
      nativeQuery = true, 
      value = "SELECT * FROM thgcop_order_placement WHERE \"order_info\" @&gt; '{\"parentOrderNumber\":\" :param \"}'")
  </code></pre>
  
  <p>I guess the <code>position [1] did not exist</code> comes from it being in double quotes plus double quote plus single quote.</p>
  
  <p>How can I make this work?</p>
  
  <p>The query is using Postgres <code>JSONB</code> datatype. The column definition is <code>ORDER_INFO JSONB</code></p>
  
  <p>The following native query works just fine in the Postgres client:</p>
  
  <pre><code>SELECT * FROM thgcop_order_placement
  WHERE "order_info" @&gt; '{"parentOrderNumber":"ORD123"}'
  </code></pre>