mirror of https://github.com/apache/openjpa.git
[OPENJPA-2834] ensure setProperty invalid properties cache in em
This commit is contained in:
parent
758b866706
commit
4a546f759c
|
@ -281,9 +281,11 @@ public class EntityManagerFactoryImpl
|
|||
OpenJPAEntityManagerSPI em = newEntityManagerImpl(broker);
|
||||
|
||||
// allow setting of other bean properties of EM
|
||||
Set<Map.Entry> entrySet = props.entrySet();
|
||||
for (Map.Entry entry : entrySet) {
|
||||
em.setProperty(entry.getKey().toString(), entry.getValue());
|
||||
if (!props.isEmpty()) {
|
||||
Set<Map.Entry> entrySet = props.entrySet();
|
||||
for (Map.Entry entry : entrySet) {
|
||||
em.setProperty(entry.getKey().toString(), entry.getValue());
|
||||
}
|
||||
}
|
||||
if (canCacheGetProperties) {
|
||||
if (emEmptyPropsProperties == null) {
|
||||
|
|
|
@ -2121,6 +2121,7 @@ public class EntityManagerImpl
|
|||
*/
|
||||
@Override
|
||||
public void setProperty(String prop, Object value) {
|
||||
properties = null;
|
||||
if (!setKernelProperty(this, prop, value)) {
|
||||
if (!setKernelProperty(this.getFetchPlan(), prop, value)) {
|
||||
Log log = getConfiguration().getLog(OpenJPAConfiguration.LOG_RUNTIME);
|
||||
|
|
Loading…
Reference in New Issue