title: Cannot deserialize instance of `java.lang.Integer` in a Query
body: <p>I fall on a incomprehensible bug with my query !</p>
  <p>HttpMessageNotReadableException: JSON parse error: Cannot deserialize instance of <code>java.lang.Integer</code> out of START_OBJECT token; nested exception is com.fasterxml.jackson.databind.exc.</p>
  <p>Decidedly I would not have thought to have so much difficulty with my queries in Java ... I just want to take all OrderProduct List by User using a query with Integer. I hope it will be my last question about Java queries :p</p>
  <p>My OrderProduct Controller</p>
  <pre><code>@RestController
  @RequestMapping(&quot;/api/auth/orders&quot;)
  @CrossOrigin()
  public class OrderController {
  
      ProductService productService;
      OrderService orderService;
      OrderProductService orderProductService;
      UserService userService;
      OrderProductRepository orderProductRepository;
  
      public OrderController(ProductService productService, 
              OrderService orderService, 
              OrderProductService orderProductService,
              OrderProductRepository orderProductRepository
              ) {
          this.productService = productService;
          this.orderService = orderService;
          this.orderProductService = orderProductService;
          this.orderProductRepository = orderProductRepository;
      }
      
      @GetMapping(&quot;/getListUserOrder&quot;)
      public @ResponseBody Iterable&lt;OrderProduct&gt; getUserOrderList(@RequestBody Integer id){
          return orderProductRepository.findOrderProductByUser(id);
      }
  
  </code></pre>
  <p>My OrderProductRepository</p>
  <pre><code>    @Query(&quot;SELECT o FROM OrderProduct o WHERE o.user=:id&quot;)
      public Iterable&lt;OrderProduct&gt; findOrderProductByUser(
        @Param(&quot;id&quot;) Integer id);
  
  }
  
  </code></pre>
  <p>My OrderProduct Model</p>
  <pre><code>
  @Entity
  @Table(name=&quot;OrderProduct&quot;)
  public class OrderProduct {
  
      @EmbeddedId
      @JsonIgnore
      private OrderProductPK pk;
  
      @Column(name=&quot;QUANTITY&quot;, nullable = false) private Integer quantity;
      
      @Column(name=&quot;USER&quot;, nullable = false) private Integer user;
  
      @Column(name=&quot;ORDERING_DATE&quot;, nullable = true) private Date dateOrdering;
      
      @Column(name=&quot;DELIVER_DATE&quot;, nullable = true) private Date dateDeliver;
      
      private boolean active;
  
  
  
      public OrderProduct() {
          super();
      }
  
  </code></pre>