0

using

  EntityManagerFactory emf = Persistence.createEntityManagerFactory(PERSISTENCE_UNIT_NAME, hibernateReactiveProperties());

        Mutiny.SessionFactory reactiveSessionFactory = emf.unwrap(Mutiny.SessionFactory.class);

but there are no entities being scan although they are marked with @Entity annotation. I wonder if there should be a place to configure the package to scan for the EntityManagerFactory?

In Spring there is LocalSessionFactoryBean with its setter setPackagesToScan("com.123.123")

Guy Assaf
  • 888
  • 9
  • 24

1 Answers1

0

solved by adding class tag for each entity in persistence.xml

    <?xml version="1.0" encoding="UTF-8"?>
<persistence version="2.1"
             xmlns="http://xmlns.jcp.org/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd">

    <persistence-unit name="default" >
        <provider>org.hibernate.reactive.provider.ReactivePersistenceProvider</provider>
        <class>com.company.EntityClassName</class>


    </persistence-unit>
</persistence>
Guy Assaf
  • 888
  • 9
  • 24