I would suspect your session management, especially if it is multi-threaded.
NHibernate does not support multi-threaded session-management. Session
Factory can be multi-threaded.

John Davidson

On Mon, May 30, 2011 at 10:30 AM, VCS <[email protected]> wrote:

> We use NHibernate in our application. Different processes access the
> same database via their own hibernate layer: A service component and
> client components.
>
> We have notice that sometimes NHibernate does the following:
> - It deletes all data in some tables.
> - It set to null some foreign keys in some other tables.
> - It recreates the data in the tables it had previously emptied.
> - It set back the foreign keys.
>
> Sometimes the ("unwanted" by us) deletion followed by a recreate data
> "goes OK". It can take up to 30 seconds.
> In some cases, I think it goes wrong during the recreation of the
> data, because some records or relationships are then missing. This
> deletion/recreation is very strange as it gets done on very static
> tables that do not get updated in our code.
> I activated the debug level for NHibernate, and I could see all the
> nhibernate calls doing it, but I could not see what triggers it.
> I could also see the SQL calls in the SQL profiler.
>
> I have the following 2 questions:
> - Are there ways of using NHibernate which can causes this unwanted
> deletion / recreation of data?
> - How can we find out the originator of the problem?
>
> vcs
>
> --
> You received this message because you are subscribed to the Google Groups
> "nhusers" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/nhusers?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en.

Reply via email to