Skip to content

Commit 7d2fc4b

Browse files
committed
Remove obj.IsProxy check on foot of comment on PR.
1 parent ce03a6e commit 7d2fc4b

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

src/NHibernate/Impl/StatelessSessionImpl.cs

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -230,17 +230,8 @@ public override object GetContextEntityIdentifier(object obj)
230230
{
231231
using (BeginProcess())
232232
{
233-
if (obj.IsProxy())
234-
{
235-
INHibernateProxy proxy = obj as INHibernateProxy;
236-
237-
return proxy.HibernateLazyInitializer.Identifier;
238-
}
239-
else
240-
{
241-
EntityEntry entry = temporaryPersistenceContext.GetEntry(obj);
242-
return (entry != null) ? entry.Id : null;
243-
}
233+
EntityEntry entry = temporaryPersistenceContext.GetEntry(obj);
234+
return (entry != null) ? entry.Id : null;
244235
}
245236
}
246237

0 commit comments

Comments
 (0)