[nhusers] Re: QueryOver works but Query do not

2011-06-03 Thread abx
Looks like the problem is related to TypeMock. Even if it is not referenced in my project. But if I disable it everything works fine -- You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to nhusers@googlegroups.com. To

[nhusers] QueryOver works but Query do not

2011-06-02 Thread abx
I am facing the following issue in a very This statement works, I get the only employee "John" var employee = session.QueryOver().Where(x => x.Name == "John").List(); but this does not: var employee = session.Query().Where(x => x.Name == "John").ToList(); This is the error i get: The type init

[nhusers] Generic abstract class

2011-05-06 Thread abx
I'm trying to have a generic abstract base class to persist many inherited joined subclasses. I need this because a requirement is to keep centralized in one table (the info generic abstract) some informations. Each subclass has a many-to-one relation to the T entity they manage. Everything works

[nhusers] Re: Two web applications need app pool recycle to refresh data

2011-02-25 Thread abx
the ISession.Refresh every time I need to check the Customer's Product. Thanks kor, your help has been very useful to get to the solution! On Feb 25, 2:25 pm, abx wrote: > Good point. I'm checking how my unit of work is managing the session. > > On Feb 25, 1

[nhusers] Re: Two web applications need app pool recycle to refresh data

2011-02-25 Thread abx
Good point. I'm checking how my unit of work is managing the session. On Feb 25, 12:41 pm, kor wrote: > ISession is created before calling ISession.BeginTransaction() ? -- You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send e

[nhusers] Re: Two web applications need app pool recycle to refresh data

2011-02-25 Thread abx
This is the code that I use for get the Customer instance from WebApp B: ISession.BeginTransaction() Customer entity = ISession.Get(primaryKey); ISession.CommitTransaction() return entity; On Feb 25, 12:25 pm, kor wrote: > when you redirect to webapp B (step 3) you use a new nh session / > tra

[nhusers] Re: Two web applications need app pool recycle to refresh data

2011-02-25 Thread abx
You're right, i forgot a step. It's better if I explain this properly :D There is the Customer entity, it contains a bag Products. 1) I check if the Customer has a Product from webapp B. If it's missing I redirect to webapp A. 2) I insert the Product in the Customer's bag from webapp A. I do thi

[nhusers] Re: Two web applications need app pool recycle to refresh data

2011-02-25 Thread abx
I do not have any session strategy implemented. On Feb 25, 11:10 am, Filip Zawada wrote: > On 2011-02-25 14:28, abx wrote: > > > Hello > > > I have two application lying on their nhibernate DAL. They use the > > same database and they have two different app pools. &g

[nhusers] Re: Two web applications need app pool recycle to refresh data

2011-02-25 Thread abx
No cache is used. On Feb 25, 11:02 am, kor wrote: > obsolete cache? -- You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to nhusers@googlegroups.com. To unsubscribe from this group, send email to nhusers+unsubscr...@go

[nhusers] Re: Two web applications need app pool recycle to refresh data

2011-02-25 Thread abx
No session is used On Feb 25, 11:10 am, Filip Zawada wrote: > On 2011-02-25 14:28, abx wrote: > > > Hello > > > I have two application lying on their nhibernate DAL. They use the > > same database and they have two different app pools. > > > When I update

[nhusers] Two web applications need app pool recycle to refresh data

2011-02-25 Thread abx
Hello I have two application lying on their nhibernate DAL. They use the same database and they have two different app pools. When I update some data from the first application, sometime for having the data refreshed into the second one I need to recycle the application pool. Any advice on this?