public final class SerializableGroovyProxy extends org.hibernate.proxy.AbstractSerializableProxy
Serialized form of an uninitialized proxy built by ByteBuddyGroovyProxyFactory.
Hibernate's own SerializableProxy rebuilds a deserialized proxy through the global
BytecodeProviderImpl and nothing else: it never consults the proxy factory the SessionFactory
was built with, so the result is a stock proxy whose Groovy MOP methods initialize it and whose
constructor fails for an entity whose trait declares default values. ByteBuddyGroovyInterceptor
writes this form instead, and readResolve() rebuilds the proxy through
ByteBuddyGroovyProxyFactory.
Hibernate 5.6 does not record the originating SessionFactory in this form unless lazy loading outside transactions is enabled, and GroovyProxyClassBuilder caches the Groovy proxy class per entity and class loader anyway, so the proxy is rebuilt through one shared provider: the class it yields is the one the SessionFactory uses. Mirrors the Hibernate 7 implementation in grails-data-hibernate7.
| Constructor and description |
|---|
SerializableGroovyProxy(java.lang.String entityName, java.lang.Class<?> persistentClass, java.lang.Class<?>[] interfaces, java.io.Serializable id, java.lang.Boolean readOnly, java.lang.String sessionFactoryUuid, boolean allowLoadOutsideTransaction, java.lang.reflect.Method getIdentifierMethod, java.lang.reflect.Method setIdentifierMethod, org.hibernate.type.CompositeType componentIdType, boolean lazyToString) |
| Methods inherited from class | Name |
|---|---|
class org.hibernate.proxy.AbstractSerializableProxy |
org.hibernate.proxy.AbstractSerializableProxy#equals(java.lang.Object), org.hibernate.proxy.AbstractSerializableProxy#getClass(), org.hibernate.proxy.AbstractSerializableProxy#hashCode(), org.hibernate.proxy.AbstractSerializableProxy#notify(), org.hibernate.proxy.AbstractSerializableProxy#notifyAll(), org.hibernate.proxy.AbstractSerializableProxy#toString(), org.hibernate.proxy.AbstractSerializableProxy#wait(), org.hibernate.proxy.AbstractSerializableProxy#wait(long), org.hibernate.proxy.AbstractSerializableProxy#wait(long, int) |