[ 
https://issues.apache.org/jira/browse/OPENJPA-2974?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Maxim Solodovnik resolved OPENJPA-2974.
---------------------------------------
      Assignee: Richard Zowalla
    Resolution: Fixed

> String cache mode properties no longer converted to enum
> --------------------------------------------------------
>
>                 Key: OPENJPA-2974
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-2974
>             Project: OpenJPA
>          Issue Type: Sub-task
>          Components: jpa
>    Affects Versions: 4.2.0
>            Reporter: Maxim Solodovnik
>            Assignee: Richard Zowalla
>            Priority: Major
>             Fix For: 4.2.0
>
>
> Discussion thread: 
> https://github.com/apache/openjpa/pull/144#discussion_r3683004301
> **(medium)** The early `return (T) value;` now also fires for String values 
> of `cache.retrieveMode`/`cache.storeMode`, skipping the enum conversion 
> below. Since EntityManagerImpl now exposes 
> `setCacheRetrieveMode(CacheRetrieveMode)`, 
> `em.setProperty("jakarta.persistence.cache.retrieveMode", "USE")` will try to 
> inject a raw String into the enum setter and fail, whereas the old code 
> converted it. Should Strings still be converted to the target enum here?



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to