title: How to use @OneToMany and @ManyToOne nest?
body: <p>I have three entities as below:</p>
  
  <pre><code>@Data
  @NoArgsConstructor
  @AllArgsConstructor
  @EqualsAndHashCode(exclude = {"id", "bricksets", "themes"})
  @Entity
  public class Brand {
      @Id
      @GeneratedValue(strategy = GenerationType.AUTO)
      private Long id;                // Unique database primary key
  
      @OneToMany(mappedBy = "brand", cascade = CascadeType.ALL)
      private List&lt;Brickset&gt; bricksets;
  
      @OneToMany(mappedBy = "brand", cascade = CascadeType.ALL)
      private List&lt;Theme&gt; themes;
  
      @NotNull
      private String name;
  }
  
  @Data
  @NoArgsConstructor
  @AllArgsConstructor
  @EqualsAndHashCode(exclude = {"id"})
  @ToString(exclude={"brand", "theme"})
  @Entity
  public class Brickset {
      @Id
      @GeneratedValue(strategy = GenerationType.AUTO)
      private Long id;            // Unique database primary key
  
      @NotNull
      private String number;      // set number
  
      @ManyToOne
      @JoinColumn(name = "brand_id")
      private Brand brand;
  
      @ManyToOne
      @JoinColumn(name = "theme_id")
      private Theme theme;
  }
  
  @Data
  @NoArgsConstructor
  @AllArgsConstructor
  @EqualsAndHashCode(exclude = {"id"})
  @ToString(exclude={"brand", "brickset"})
  @Entity
  public class Theme {
      @Id
      @GeneratedValue(strategy = GenerationType.AUTO)
      private Long id;                // Unique database primary key
  
      @NotNull
      private String name;
  
      @ManyToOne
      @JoinColumn(name = "brand_id")
      private Brand brand;
  
      @OneToMany(mappedBy = "Theme", cascade = CascadeType.ALL)
      private List&lt;Brickset&gt; brickset;
  }
  </code></pre>
  
  <p>But I met compile error as below, I tried to solve it by myself, but I am very new in JPA/Hibernate, can you help me and how can I do next? I thought the problem is what I used ManyToOne and OneToMany in Entity Theme, that might be confused by JPA/Hibernate, may I make sense?</p>
  
  <pre><code>Caused by: org.hibernate.AnnotationException: Illegal attempt to map a non collection as a @OneToMany, @ManyToMany or @CollectionOfElements: com.zangland.entity.Theme.brickset
  </code></pre>