I don't know if this is realy possible. I'm trying to use JPA entities (with annotations) via Hibernate Configuration, but is sending me an error: org.hibernate.MappingNotFoundException: resource: org/rds4jpa/base/config/domain/KeyGroup.hbm.xml not found
I don't have hbm.xml files since it is JPA annotated. My configuration:
Configuration cfg = new Configuration(); cfg.setProperty("hibernate.dialect", "org.hibernate.dialect.PostgreSQLDialect"); cfg.setProperty("hibernate.connection.driver_class", "org.postgresql.Driver"); cfg.setProperty("hibernate.connection.url", "jdbc:postgresql://localhost:5432/jpa_test"); cfg.setProperty("hibernate.connection.username", "postgres"); cfg.setProperty("hibernate.connection.password", "***********"); cfg.setProperty("hibernate.show_sql", "true"); cfg.setProperty("hibernate.hbm2ddl.auto", "create-drop"); //org.rds4jpa.base cfg.addClass(KeyGroup.class); cfg.addClass(KeyValue.class); //org.rds4jpa.audit cfg.addClass(Audit.class); cfg.addClass(AuditLine.class); //org.rds4jpa.security cfg.addClass(User.class); cfg.addClass(LinkUserRole.class); cfg.addClass(Role.class);
|