HHH-17467 Handle proxies when checking entity type instance
This commit is contained in:
parent
74066a7afe
commit
e8d436ffb2
|
@ -6,6 +6,7 @@
|
||||||
*/
|
*/
|
||||||
package org.hibernate.type.descriptor.java.spi;
|
package org.hibernate.type.descriptor.java.spi;
|
||||||
|
|
||||||
|
import org.hibernate.Hibernate;
|
||||||
import org.hibernate.type.descriptor.WrapperOptions;
|
import org.hibernate.type.descriptor.WrapperOptions;
|
||||||
import org.hibernate.type.descriptor.java.AbstractClassJavaType;
|
import org.hibernate.type.descriptor.java.AbstractClassJavaType;
|
||||||
import org.hibernate.type.descriptor.java.IncomparableComparator;
|
import org.hibernate.type.descriptor.java.IncomparableComparator;
|
||||||
|
@ -41,6 +42,11 @@ public class EntityJavaType<T> extends AbstractClassJavaType<T> {
|
||||||
return one == another;
|
return one == another;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isInstance(Object value) {
|
||||||
|
return getJavaTypeClass().isAssignableFrom( Hibernate.getClassLazy( value ) );
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString(T value) {
|
public String toString(T value) {
|
||||||
return value.toString();
|
return value.toString();
|
||||||
|
|
Loading…
Reference in New Issue