This is an automated email from the ASF dual-hosted git repository. pcristof pushed a commit to branch OPENJPA-2940 in repository https://gitbox.apache.org/repos/asf/openjpa.git
commit 6189cbd800249e85223668663651f3c26c221d97 Author: Paulo Cristovão de Araújo Silva Filho <pcris...@gmail.com> AuthorDate: Tue Jul 22 21:45:35 2025 -0300 [OPENJPA-2940][WIP] Fixing partial impl * Original impl was wrongfully dependent of persistence.xml file * Fixed this issue, but still lacking actual conversion of PersistenceConfiguration properties to openjpa corresponding properties --- .../apache/openjpa/persistence/simple/TestEntityManagerFactory.java | 2 +- .../java/org/apache/openjpa/persistence/PersistenceProviderImpl.java | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/simple/TestEntityManagerFactory.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/simple/TestEntityManagerFactory.java index add6bf55a..49c452cb4 100644 --- a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/simple/TestEntityManagerFactory.java +++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/simple/TestEntityManagerFactory.java @@ -37,7 +37,7 @@ public class TestEntityManagerFactory extends TestCase { } public void testEMFCreation() { - PersistenceConfiguration conf = new PersistenceConfiguration("test"); + PersistenceConfiguration conf = new PersistenceConfiguration("non-existent-PU"); conf.managedClass(AllFieldTypes.class); conf.property(PersistenceConfiguration.SCHEMAGEN_DATABASE_ACTION, "drop-and-create"); diff --git a/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceProviderImpl.java b/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceProviderImpl.java index 6b62be7cc..55f64a01a 100644 --- a/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceProviderImpl.java +++ b/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceProviderImpl.java @@ -174,7 +174,8 @@ public class PersistenceProviderImpl : ""; config.property("openjpa.MetaDataFactory", "jpa(Types=" + managedClassesList + old + ")"); } - return createEntityManagerFactory(config.name(), config.properties()); + config.property("openjpa.Id", config.name()); + return createEntityManagerFactory(null, config.properties()); } @Override