title: Is LinkedHashSet not allowed to use with Spring Data Jpa?
body: <p>I have a class defined as the following;</p>
  <pre><code>@Entity
  @Table(name = &quot;student&quot;)
  @Getter
  @Setter
  @SuperBuilder
  @AllArgsConstructor
  @NoArgsConstructor
  @ToString
  public class Student {
      @Id
      @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = &quot;student_id_seq&quot;)
      @SequenceGenerator(name = &quot;student_id_seq&quot;, sequenceName = &quot;student_id_seq&quot;, allocationSize = 1)
      private Long id;
  
      @ToString.Exclude
      @Builder.Default
      @OneToMany(mappedBy = &quot;studentId&quot;, targetEntity = Note.class, cascade = CascadeType.ALL, fetch = FetchType.EAGER, orphanRemoval = true)
      private LinkedHashSet&lt;Note&gt; notes = new LinkedHashSet&lt;&gt;();
  }
  </code></pre>
  <p>However, when I try to run the program, the following error logs occur;</p>
  <pre><code>Caused by: org.hibernate.AnnotationException: java.util.LinkedHashSet collection type not supported for property: com.example.studentmanagementservice.model.Student.notes
      at org.hibernate.cfg.annotations.CollectionBinder.getCollectionBinder(CollectionBinder.java:316)
      at org.hibernate.cfg.AnnotationBinder.processElementAnnotations(AnnotationBinder.java:1956)
      at org.hibernate.cfg.AnnotationBinder.processIdPropertiesIfNotAlready(AnnotationBinder.java:979)
      at org.hibernate.cfg.AnnotationBinder.bindClass(AnnotationBinder.java:806)
      at org.hibernate.boot.model.source.internal.annotations.AnnotationMetadataSourceProcessorImpl.processEntityHierarchies(AnnotationMetadataSourceProcessorImpl.java:248)
      at org.hibernate.boot.model.process.spi.MetadataBuildingProcess$1.processEntityHierarchies(MetadataBuildingProcess.java:239)
      at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.complete(MetadataBuildingProcess.java:282)
      at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.metadata(EntityManagerFactoryBuilderImpl.java:1224)
      at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:1255)
      at org.springframework.orm.jpa.vendor.SpringHibernateJpaPersistenceProvider.createContainerEntityManagerFactory(SpringHibernateJpaPersistenceProvider.java:58)
      at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:365)
      at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.buildNativeEntityManagerFactory(AbstractEntityManagerFactoryBean.java:409)
      at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:396)
      at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.afterPropertiesSet(LocalContainerEntityManagerFactoryBean.java:341)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1845)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1782)
      ... 21 common frames omitted
  </code></pre>
  <p>And also the following error;</p>
  <pre><code>org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: Invocation of init method failed; nested exception is org.hibernate.AnnotationException: java.util.LinkedHashSet collection type not supported for property: com.example.studentmanagementservice.model.Student.notes
  </code></pre>
  <p>How can I use LinkedHashSet inside an entity?</p>