title: Problems with the relationship of one to many
body: <p>I have problems with the relationship of one to many, to relate I just want to use the user ID I do not want to create a new one, I put my code</p>
  
  <pre><code>@PostMapping("/createFavorite")
      public ResponseEntity&lt;Favorite&gt; createFavorite(@RequestBody Favorite favorite) {
  
          return new ResponseEntity&lt;Favorite&gt;(userServiceImpl.createFavorite(favorite), HttpStatus.OK);
      }
  </code></pre>
  
  <p>my entity Favorite is </p>
  
  <pre><code>public class Favorite implements Serializable {
  
      @Id
      @GeneratedValue(strategy = GenerationType.AUTO)
      private long id;
  
      @Column(name = "element")
      private String element;
  
      @ManyToOne
      @JoinColumn(name = "user_fk")
      User user;
  </code></pre>
  
  <p>in swagger i get this </p>
  
  <pre><code>{
    "element": "string",
    "user": {
      "email": "string",
      "id": 0,
      "life": "suspend",
      "name": "string",
      "password": "string"
    }
  }
  </code></pre>
  
  <p>i do not want to create new user,
  The user is already created, I just need to use your ID to reference it</p>