Open rxue opened 5 months ago
encountered error:
org.hibernate.AnnotationException: Collection 'rx.dictionary.jpa.entity.LexicalItem.explanations' is 'mappedBy' a property named 'lexicalItemID' which does not exist in the target entity 'rx.dictionary.jpa.entity.Explanation'
at org.hibernate.boot.model.internal.CollectionBinder.isReversePropertyInJoin (CollectionBinder.java:1611)
at org.hibernate.boot.model.internal.CollectionBinder.noAssociationTable (CollectionBinder.java:1625)
at org.hibernate.boot.model.internal.CollectionBinder.bindStarToManySecondPass (CollectionBinder.java:1586)
at org.hibernate.boot.model.internal.CollectionBinder$1.secondPass (CollectionBinder.java:1577)
at org.hibernate.boot.model.internal.CollectionSecondPass.doSecondPass (CollectionSecondPass.java:45)
at org.hibernate.boot.internal.InFlightMetadataCollectorImpl.processSecondPasses (InFlightMetadataCollectorImpl.java:1815)
at org.hibernate.boot.internal.InFlightMetadataCollectorImpl.processSecondPasses (InFlightMetadataCollectorImpl.java:1774)
at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.complete (MetadataBuildingProcess.java:331)
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.metadata (EntityManagerFactoryBuilderImpl.java:1432)
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build (EntityManagerFactoryBuilderImpl.java:1503)
at org.hibernate.jpa.HibernatePersistenceProvider.createEntityManagerFactory (HibernatePersistenceProvider.java:55)
at jakarta.persistence.Persistence.createEntityManagerFactory (Persistence.java:80)
at jakarta.persistence.Persistence.createEntityManagerFactory (Persistence.java:55)
at rx.dictionary.jpa.Main.main (Main.java:9)
at org.codehaus.mojo.exec.ExecJavaMojo$1.run (ExecJavaMojo.java:254)
at java.lang.Thread.run (Thread.java:840)
Got the following DDL generated and executed with pure
@OneToMany
annotation onLexicalItem#explanations
:lexical_item_Explanation
table was created for the one-to-many relationship, but it is an extra table :<