[
https://issues.apache.org/jira/browse/OPENJPA-2977?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18116565#comment-18116565
]
ASF subversion and git services commented on OPENJPA-2977:
----------------------------------------------------------
Commit 03285dab900a74e886d79ed4035611cfe5edd652 in openjpa's branch
refs/heads/master from Richard Zowalla
[ https://gitbox.apache.org/repos/asf?p=openjpa.git;h=03285dab9 ]
[OPENJPA-2977] Stop mutating PersistenceConfiguration and honour mapping files
convert() no longer writes into the caller's configuration. The derived
OpenJPA properties are returned by toProperties() on a copy of the
configuration properties, the managed classes and mapping files are wired
into the persistence unit info, and a user supplied MetaDataFactory is
merged as a proper plugin string. Drop the unused
PersistenceProductDerivation.load(PersistenceConfiguration, Map).
> 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
> Priority: Major
> 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)