title: Symfony POST Value Id transform to entity
body: <p>it's newby question but i don't found answer on web :'(</p>
  
  <p>I have Ajax script send Id of Product &amp; Id of Recommendation with POST method</p>
  
  <pre><code>$(".isProduct").click(function (e) {
              let productId = $(this).attr('product_id')
              let name = $(this).text()
              $.ajax({
                  url: '/recommendations/add-product',
                  type: 'POST',
                  data: {
                      'recommendationId': {{ recommendations.id }},
                      'productId': productId
                  },
                  dataType: 'JSON',
                  complete : function (response) {
                      $.toast({
                          heading: 'Produit ajouté avec succès',
                          text: 'Ajout de ' + name,
                          position: 'bottom-right',
                          loaderBg: '#ff6849',
                          icon: 'success',
                          hideAfter: 3000,
                          stack: 6
                      });
                      let nameProduct = response.responseJSON['name_product']
                      let input = '&lt;li&gt;&lt;b&gt;'+ nameProduct +'&lt;/b&gt; &lt;small&gt;0.75 L/ha&lt;/small&gt;&lt;/li&gt;'
                      $('#products_list').append( input )
                  }
              })
          })
  </code></pre>
  
  <p>I send two id to my controller </p>
  
  <p>On my controller i want transform this ID (String) to Entity for put  this to relational db</p>
  
  <pre><code>/**
       * @Route("recommendations/add-product", name="recommendations.add.product")
       * @param Request $request
       * @return JsonResponse
       */
      public function canevasAddProduct( Request $request )
      {
          if ($request-&gt;isXmlHttpRequest()) {
              //-- SETTERS
              $recommendationProducts = new RecommendationProducts();
              $recommendationProducts-&gt;setProduct( $request-&gt;get('productId') );
              $recommendationProducts-&gt;setRecommendation( $request-&gt;get( 'recommendationId') );
  
              //-- Go to db new entry
              $this-&gt;em-&gt;persist($recommendationProducts);
              $this-&gt;em-&gt;flush();
  
              return $this-&gt;json([
                  'name_product' =&gt; $recommendationProducts-&gt;getProduct()-&gt;getName()
              ], 200);
          }
  
          return new JsonResponse([
              'message' =&gt; 'AJAX Only',
              'type' =&gt; 'error'
          ]);
      }
  </code></pre>
  
  <p>I use $request->get() but he return a string and not an object of entity.
  I use @ParamsConverter but is dont working.</p>
  
  <p>Thank a lot</p>