title: Infinity loop when using findAll() Spring JPA PostgreSQL
body: <p>Here is my entitiy:</p>
  
  <pre><code>@Entity
  @Table(name = "remind")
  
  public class Remind {
  
  @Id
  @GeneratedValue(generator = "increment")
  @GenericGenerator(name = "increment", strategy = "increment")
  private long id;
  
  @Column(name = "title", nullable = false, length = 50)
  private String title;
  
  @Column(name = "remind_date", nullable = false)
  @Temporal(TemporalType.TIMESTAMP)
  private Date remindDate;
  
  
  public Remind() {
  }
  
  public long getId() {
      return id;
  }
  
  public void setId(long id) {
      this.id = id;
  }
  
  public String getTitle() {
      return title;
  }
  
  public void setTitle(String title) {
      this.title = title;
  }
  
  public Date getRemindDate() {
      return remindDate;
  }
  
  public void setRemindDate(Date remindDate) {
      this.remindDate = remindDate;
  }
  
   //---Dependency----&gt;
  
  @OneToOne(optional = false)
  @JoinColumn(name="id_user", unique = true, nullable = true, updatable = false)
  private Users user;
  
  public void setUser(Users user) {
      this.user = user;
  }
  
  public Users getUser() {
      return user;
  }
  
  
  
  }
  </code></pre>
  
  <p>And here is another entity:</p>
  
  <pre><code>@Entity
  @Table(name = "users")
  
  public class Users {
  
  @Id
  @GeneratedValue(generator = "increment")
  @GenericGenerator(name = "increment", strategy = "increment")
  private long id;
  
  @Column(name = "name", nullable = false, length = 50)
  private String name;
  
  public Users() {
  }
  
  public long getId() {
      return id;
  }
  
  public void setId(long id) {
      this.id = id;
  }
  
  public String getName() {
      return name;
  }
  
  public void setName(String title) {
      this.name = name;
  }
  
  
  
   //---Dependency----&gt;
  
  @OneToOne(optional = false, mappedBy="user")
  public Remind remind;
  
  public Remind getRemind() {
      return remind;
  }
  
  public void setRemind(Remind remind) {
      this.remind = remind;
  }
  </code></pre>
  
  <p>Here is diagram that Idea shows me:
      <a href="https://i.stack.imgur.com/zgRm1.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/zgRm1.png" alt="diagram of db"></a></p>
  
  <p>But when I use in RemindController.class:</p>
  
  <pre><code>@RequestMapping(value = "/get", method = RequestMethod.GET)
  @ResponseBody
  public List&lt;Remind&gt; getReminder() {
      List&lt;Remind&gt; list = remindRepository.findAll();
      return list;
  }
  </code></pre>
  
  <p>I have this result... infinity loop:</p>
  
  <p><a href="https://i.stack.imgur.com/m39ws.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/m39ws.png" alt="enter image description here"></a></p>
  
  <p>What am I do wrong? It seems like diagram is ok. Help me please(</p>