Skip to content

Commit 8cf1614

Browse files
committed
Throw if _generateFieldInterceptionProxy is true because IProxyFactory implementors are currently not serializable.
1 parent e300981 commit 8cf1614

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/NHibernate/Tuple/PocoInstantiator.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,11 @@ public bool IsInstance(object obj)
130130

131131
public void OnDeserialization(object sender)
132132
{
133+
if (_generateFieldInterceptionProxy)
134+
{
135+
throw new InvalidOperationException("IProxyFactory implementors are currently not serializable.");
136+
}
137+
133138
_constructor = ReflectHelper.GetDefaultConstructor(_mappedClass.GetType());
134139
}
135140

0 commit comments

Comments
 (0)