From 7bf1f418e1f7c8fc7b5a98545f687b89bed47102 Mon Sep 17 00:00:00 2001 From: Shani Holdengreber Date: Tue, 2 Jun 2026 06:54:01 -0500 Subject: [PATCH] fix:Issue with immutable --- .../crudframework/crud/hooks/interfaces/MultiFieldChangeHook.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/crud-framework-core/src/main/java/dev/krud/crudframework/crud/hooks/interfaces/MultiFieldChangeHook.kt b/crud-framework-core/src/main/java/dev/krud/crudframework/crud/hooks/interfaces/MultiFieldChangeHook.kt index fd3c888..60e7e7b 100644 --- a/crud-framework-core/src/main/java/dev/krud/crudframework/crud/hooks/interfaces/MultiFieldChangeHook.kt +++ b/crud-framework-core/src/main/java/dev/krud/crudframework/crud/hooks/interfaces/MultiFieldChangeHook.kt @@ -43,6 +43,7 @@ abstract class MultiFieldChangeHook>( @Suppress("UNCHECKED_CAST") private fun makeImmutable(entity: Entity): Entity { val proxyFactory = ProxyFactory(entity) + proxyFactory.isProxyTargetClass = true proxyFactory.addAdvice(MethodInterceptor { invocation -> if (invocation.method.name.startsWith("set")) { throw UnsupportedOperationException("Cannot modify the original entity inside a MultiFieldChangeHook callback")