title: Angularjs + Spring jpa repository Many-to-one field is not saving
body: <p>I am using Angularjs, Spring jpa repository, hibernate. 
  The problem is "Unable to save the id of the Customer in the order table."
  table names: Order, CustomerGlobal
  reference col name for Customer in Order table is customerGlobal_id.
  Order belongs to a Customer. Order table has a customerGlobal_id field.</p>
  
  <p>In the Entity (Order), I have defined</p>
  
  <pre><code>@ManyToOne(optional = false) @JsonIgnore
  CustomerGlobal customerGlobal;
  </code></pre>
  
  <p>Order belongs to one Customer. If I specify a JoinColumn, hibernate is generating the column in the database. So, I think there is no issue there.
  I have added Getter and Setter for the customerGlobal field.</p>
  
  <p>I am using JPA repository, the interface is defined as follows:</p>
  
  <pre><code>public interface OrderRepo extends JpaRepository&lt;Order, Long&gt;, JpaSpecificationExecutor&lt;Order&gt; {
  ...
  }
  </code></pre>
  
  <p>I am assuming that this would work fine too.</p>
  
  <p>Here is the relevant part of the html:</p>
  
  <pre><code> &lt;select ng-options="convertToInt(customer.id) as customer.name for customer in c" class="form-control " name="customerGlobal" ng-model="req.customerGlobal" required&gt;&lt;/select&gt;
  </code></pre>
  
  <p>This is part of a form which gets saved from the associated controller. The values for c are obtained by get request on load.</p>
  
  <pre><code>[{"id":1,"name":"XYZ","contactPerson":"ABC","mobile":"1111111111","email":"abc@adef.com",}]
  </code></pre>
  
  <p>This seems to be working fine. I get a dropdown list of the customers in the table.</p>
  
  <p>When I save the form, customerGlobal_id and other field values are sent via POST but the customerGlobal_id does not get saved to the database.</p>
  
  <p>This does not seem to be a very specific problem. This is a basic many-to-one relationship that is not getting saved. I am not completely familiar with Angularjs. So please help me out with this. Thanks in advance.</p>