Maxim Solodovnik created OPENJPA-2977:
-----------------------------------------
Summary: convert() mutates caller config, ignores mappingFiles
Key: OPENJPA-2977
URL: https://issues.apache.org/jira/browse/OPENJPA-2977
Project: OpenJPA
Issue Type: Sub-task
Components: jpa
Affects Versions: 4.2.0
Reporter: Maxim Solodovnik
Fix For: 4.2.0
Discussion thread:
https://github.com/apache/openjpa/pull/144#discussion_r3683004644
**(medium)** `convert(PersistenceConfiguration)` mutates the caller's
configuration object (`config.property(...)` for MetaDataFactory and
noPersistenceXMLResource) - a surprising side effect for a converter, and
repeated `createEntityManagerFactory(config)` calls keep appending. It also
ignores `config.mappingFiles()` and `config.qualifiers()` entirely, and
`setPersistenceUnitName(config.name())` is called twice (lines 648 and 662).
Could the OpenJPA-specific properties go into the returned map instead, and
mapping files be wired through?
--
This message was sent by Atlassian Jira
(v8.20.10#820010)