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;
|
||||
|
||||
import org.hibernate.Hibernate;
|
||||
import org.hibernate.type.descriptor.WrapperOptions;
|
||||
import org.hibernate.type.descriptor.java.AbstractClassJavaType;
|
||||
import org.hibernate.type.descriptor.java.IncomparableComparator;
|
||||
|
@ -41,6 +42,11 @@ public class EntityJavaType<T> extends AbstractClassJavaType<T> {
|
|||
return one == another;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isInstance(Object value) {
|
||||
return getJavaTypeClass().isAssignableFrom( Hibernate.getClassLazy( value ) );
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString(T value) {
|
||||
return value.toString();
|
||||
|
|
Loading…
Reference in New Issue