Hi all, I am trying to check the proxy object and its persister info.
However in some cases I am not able to analyze the entity since its
uninitialized and not sure how to avoid exceptions, for more info see
example:
var isProxy= objectToCheck.IsProxy();
if ( isProxy )
{
ILazyInitializer li =
((INHibernateProxy)objectToCheck).HibernateLazyInitializer;
var tmp = li.GetImplementation();
}
Problem is that in some proxies - there is no target, so no such
implementation exists - based on that, I am not able to get
persister/entity entry to check some additional info.
Is there better way, than silently catching "ObjectNotFoundException: No
row with the given identifier exists" exception to avoid this ? Is there
any way, how can I detect these uninitialized proxy ?
I tried some things like checking persistent context entity entries key
list or using IsUninitialized property - but this is always false for each
entity etc.
Thanks in advance.
Br. Palo
--
You received this message because you are subscribed to the Google Groups
"nhusers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/nhusers/f6b99110-03b8-4f32-b18d-deb9b1376aa0n%40googlegroups.com.