title: JPA Cascading not updating the child table
body: <p>I am having two table with foreign key relation. Now I want while saving data into parent table it will automatically update the parent id into child table. But I unable to save it into child table.
  Below my code sample </p>
  
  <pre><code>@CrossOrigin
  @Transactional
  @RequestMapping(value = "/m/auth/merchant/order", method = RequestMethod.POST)
  public MerchantOrder setShippingAddress(@RequestBody MerchantOrder merchantOrder) throws HLRestException {
      if(merchantOrder != null) {
          MerchantOrder order = new MerchantOrder();
          Product product = new Product();
          product.setMerchantOrder(order);
          List&lt;Product&gt; products = order.getProducts();
          products.add(product);
          order.setProducts(products);
          order = merchantOrderRepo.save(order);
          return merchantOrder;
      }
      else {
          throw new HLRestException("Order shipping failed");
      }
  }
  
  
  ========MerchantOrder Class=====
  @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
  List&lt;Product&gt; products;
  
  ========Product Class=======
  @ManyToOne(cascade = CascadeType.REFRESH, fetch = FetchType.LAZY)
  MerchantOrder merchantOrder;
  </code></pre>