title: Spring Hibernate/JPA Postgres: value too long for type character varying(255)
body: <p>I am trying to setup relationships from Spring Boot, Hibernate/JPA but after trying the whole day and today morning, it hasn't worked.  I have received several errors but now the error is limited to:</p>
  
  <pre><code>org.postgresql.util.PSQLException: ERROR: value too long for type character varying(255)
  </code></pre>
  
  <p>Below are my POJOs:</p>
  
  <pre><code>@Entity
  public class ParentEvent implements Serializable {
  
      @Id
      @GeneratedValue
      private long _id;
  
      @OneToMany(cascade = CascadeType.ALL, mappedBy = "parentEvent")
      private List&lt;ChildEvent&gt; childEvent;
  
      // other getters and setters
  }
  
  @Entity
  public class ChildEvent implements Serializable {
  
      @Id
      @GeneratedValue
      private long id;
  
      @ManyToOne(fetch = FetchType.LAZY)
      @JoinColumn(name="parentEvent__id")
      private ParentEvent parentEvent;
  
      // other getters and setters ..
  }
  </code></pre>
  
  <p>And I have the following json structure:</p>
  
  <pre><code>parentEvent: {
      childEvent: [
          {
              param1: "value",
              param2: "value",
          },
          {
              param1: "value",
              param2: "value",
          },
      ]
  }
  </code></pre>
  
  <p>I have gone through several stackoverflow posts and tutorials and the above structure looks fine, but I am unable to get it to work.</p>
  
  <p>What am I doing wrong?</p>