2012/12/1 Romain Winterfield <[email protected]>: > Hey all, > > I got a huge issue with nHibernate that makes me almost crazy. Concerning
So far, it doesn't look like it has anything to do with NHibernate. > > I found out that the problem doesn't appear if I declare the variable number > as static. But this can't be it. Can anyone please help me? Any ideas? Would Why can it not? The code excerpt suggests that you are attempting to cache the _entries, which means the querying and the number-increment will only happen once for each instance of whatever contains that code. Which means the second invocation you speak of must be on another instance. And since the "number" instance member isn't static it would be zero again. I'm also gonna suggest avoiding naming local variables the same as instance members to reduce confusion. /Oskar -- 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.
