org.hibernate.cfg.NotYetImplementedException: Collections having FK in secondary table

Hibernate JIRA | Stephen Fikes | 1 year ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Creating a OneToMany association to a joined subclass where the foreign key column already exists in the superclass of the joined subclass. @OneToMany @JoinColumn(name = "employee_id", table = "task_base") private Set<Task> tasks; When building the entity manager, the following exception occurs (due to the need for the 'table' property): org.hibernate.cfg.NotYetImplementedException: Collections having FK in secondary table at org.hibernate.cfg.AnnotationBinder.processElementAnnotations(AnnotationBinder.java:2035) at org.hibernate.cfg.AnnotationBinder.processIdPropertiesIfNotAlready(AnnotationBinder.java:904) at org.hibernate.cfg.AnnotationBinder.bindClass(AnnotationBinder.java:731) at org.hibernate.boot.model.source.internal.annotations.AnnotationMetadataSourceProcessorImpl.processEntityHierarchies(AnnotationMetadataSourceProcessorImpl.java:245) at org.hibernate.boot.model.process.spi.MetadataBuildingProcess$1.processEntityHierarchies(MetadataBuildingProcess.java:222) at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.complete(MetadataBuildingProcess.java:265) at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.metadata(EntityManagerFactoryBuilderImpl.java:847) at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:874) at org.hibernate.jpa.HibernatePersistenceProvider.createEntityManagerFactory(HibernatePersistenceProvider.java:58) ...

    Hibernate JIRA | 1 year ago | Stephen Fikes
    org.hibernate.cfg.NotYetImplementedException: Collections having FK in secondary table
  2. 0

    Creating a OneToMany association to a joined subclass where the foreign key column already exists in the superclass of the joined subclass. @OneToMany @JoinColumn(name = "employee_id", table = "task_base") private Set<Task> tasks; When building the entity manager, the following exception occurs (due to the need for the 'table' property): org.hibernate.cfg.NotYetImplementedException: Collections having FK in secondary table at org.hibernate.cfg.AnnotationBinder.processElementAnnotations(AnnotationBinder.java:2035) at org.hibernate.cfg.AnnotationBinder.processIdPropertiesIfNotAlready(AnnotationBinder.java:904) at org.hibernate.cfg.AnnotationBinder.bindClass(AnnotationBinder.java:731) at org.hibernate.boot.model.source.internal.annotations.AnnotationMetadataSourceProcessorImpl.processEntityHierarchies(AnnotationMetadataSourceProcessorImpl.java:245) at org.hibernate.boot.model.process.spi.MetadataBuildingProcess$1.processEntityHierarchies(MetadataBuildingProcess.java:222) at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.complete(MetadataBuildingProcess.java:265) at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.metadata(EntityManagerFactoryBuilderImpl.java:847) at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:874) at org.hibernate.jpa.HibernatePersistenceProvider.createEntityManagerFactory(HibernatePersistenceProvider.java:58) ...

    Hibernate JIRA | 1 year ago | Stephen Fikes
    org.hibernate.cfg.NotYetImplementedException: Collections having FK in secondary table

    Root Cause Analysis

    1. org.hibernate.cfg.NotYetImplementedException

      Collections having FK in secondary table

      at org.hibernate.cfg.AnnotationBinder.processElementAnnotations()
    2. Hibernate
      AnnotationBinder.bindClass
      1. org.hibernate.cfg.AnnotationBinder.processElementAnnotations(AnnotationBinder.java:2035)
      2. org.hibernate.cfg.AnnotationBinder.processIdPropertiesIfNotAlready(AnnotationBinder.java:904)
      3. org.hibernate.cfg.AnnotationBinder.bindClass(AnnotationBinder.java:731)
      3 frames
    3. org.hibernate.boot
      MetadataBuildingProcess.complete
      1. org.hibernate.boot.model.source.internal.annotations.AnnotationMetadataSourceProcessorImpl.processEntityHierarchies(AnnotationMetadataSourceProcessorImpl.java:245)
      2. org.hibernate.boot.model.process.spi.MetadataBuildingProcess$1.processEntityHierarchies(MetadataBuildingProcess.java:222)
      3. org.hibernate.boot.model.process.spi.MetadataBuildingProcess.complete(MetadataBuildingProcess.java:265)
      3 frames
    4. org.hibernate.jpa
      HibernatePersistenceProvider.createEntityManagerFactory
      1. org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.metadata(EntityManagerFactoryBuilderImpl.java:847)
      2. org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:874)
      3. org.hibernate.jpa.HibernatePersistenceProvider.createEntityManagerFactory(HibernatePersistenceProvider.java:58)
      3 frames