-
Notifications
You must be signed in to change notification settings - Fork 923
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NHibernate.Envers and ProxyForFieldInterceptor #2913
Labels
Comments
Exception from Envers
|
Looks related to #2727 |
So a local fix would be using private static object getIdentifier(ISessionImplementor session, object obj)
{
return obj == null
? null
: (obj is INHibernateProxy objAsProxy
? objAsProxy.HibernateLazyInitializer.Identifier
: session.GetEntityPersister(session.BestGuessEntityName(obj), obj).GetIdentifier(obj));
} |
@bahusoid thanks, fixed (in envers) |
Thanks to all |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Envers has code that cast object to
INHibernateProxy
Now I have some trouble with object saving.
I get some object with lazy reference from DB
And NHibernate set Lazy property as CantonProxyForFieldInterceptor
Next I create new Object and get Canton from DB using session.Query.Where(x=>x.Id=1)
And Nhibernate return CantonProxyForFieldInterceptor.
This thing completely kill Envers :(
The text was updated successfully, but these errors were encountered: