You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
lately I ran into an issue when I'm using Interceptors derived from EmptyInterceptor to generate some properties (i.e. Created and LastModified) on my entities. For some use cases I don't want to regenerate those values so I have transient (not persistent) property and in Interceptor I'm checking whether I should or should not generate those values. However after calling Session.Merge() those properties are always restored with default values (as NHibernate is not aware of them so it's not mapped).
I found that DefaultMergeEventListener is responsible for mapping properties but I'm not able to find a way to trigger mapping of some specific Transient values.
I tried some specific MergeEventsListener but that's already late.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi guys,
lately I ran into an issue when I'm using
Interceptors
derived fromEmptyInterceptor
to generate some properties (i.e. Created and LastModified) on my entities. For some use cases I don't want to regenerate those values so I have transient (not persistent) property and inInterceptor
I'm checking whether I should or should not generate those values. However after calling Session.Merge() those properties are always restored with default values (as NHibernate is not aware of them so it's not mapped).I found that
DefaultMergeEventListener
is responsible for mapping properties but I'm not able to find a way to trigger mapping of some specific Transient values.I tried some specific
MergeEventsListener
but that's already late.Do you have any idea how to solve this issue?
Thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions