title: how to pass namedQuery parameters in Apache Camel JPA by header?
body: <p>I have this camel route:</p>
  
  <pre><code>from("direct:getUser")
      .pollEnrich("jpa://User?namedQuery=User.findById&amp;consumeDelete=false");
  </code></pre>
  
  <p>This is my user Entity:</p>
  
  <pre><code>@Entity
  @NamedQueries({
      @NamedQuery(name="User.findAll", query="SELECT u FROM User u"),
      @NamedQuery(name="User.findById", query="SELECT u FROM User u WHERE u.id = :id")
  })
  public class User{
      @Id
      private String id;
  }
  </code></pre>
  
  <p>I have tried this route by setting the header:</p>
  
  <pre><code>from("direct:getUser")
      .setHeader("id", simple("myid"))
      .pollEnrich("jpa://User?namedQuery=User.findById&amp;consumeDelete=false");
  </code></pre>
  
  <p>But it is not working</p>
  
  <p>Is there any method to set jpa properties by the headers? The camel documentation quote this in <code>parameters</code> option but i don't found the examples</p>
  
  <blockquote>
    <p>Options: <code>parameters</code></p>
    
    <p>This option is Registry based which requires the # notation. This
    key/value mapping is used for building the query parameters. It is
    expected to be of the generic type java.util.Map where
    the keys are the named parameters of a given JPA query and the values
    are their corresponding effective values you want to select for. Camel
    2.19: it can be used for producer as well. When it's used for producer, Simple expression can be used as a parameter value. It
    allows you to retrieve parameter values from the message body header
    and etc.</p>
  </blockquote>