Unwrap raw target Query instance in case of proxy mismatch

Closes gh-32766
This commit is contained in:
Juergen Hoeller
2024-05-06 20:09:43 +02:00
parent aebc48ee8d
commit 59a125d06f
2 changed files with 58 additions and 35 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2023 the original author or authors.
* Copyright 2002-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -394,6 +394,9 @@ public abstract class SharedEntityManagerCreator {
else if (targetClass.isInstance(proxy)) {
return proxy;
}
else {
return this.target.unwrap(targetClass);
}
}
case "getOutputParameterValue" -> {
if (this.entityManager == null) {