[nhusers] Re: UnitOfWork and HttpContext

2010-03-02 Thread Zorgoban
I dont like how this Hanselmann states his personal opinion as fact without really explaining the backgrounds. He absolutely lost my respect when simply calling ThreadStatic evil, but stating Thread.AllocateNamedDataSlot as good solution, while this is eventually the same thing. Its even written in

Re: [nhusers] Many-to-one in legacy db

2010-03-02 Thread Fabio Maulo
No problem Simon... my advise was only to prevent some request, as I saw in the past, in our JIRA. What is important is recognize where the real problem is and avoid workaround through NH. 2010/3/2 Simon Laroche > Hi Fabio, > > I'm sorry if what I wrote sounded like I was requesting a feature fo

Re: [nhusers] Many-to-one in legacy db

2010-03-02 Thread Simon Laroche
Hi Fabio, I'm sorry if what I wrote sounded like I was requesting a feature for what is obviously a problem with the database design. Yes not-found="ignore" will be fine since for this app's performance is not really critical. And yes, as soon as possible, we will change the db. Thanks, Simon

Re: [nhusers] Many-to-one in legacy db

2010-03-02 Thread Fabio Maulo
what I mean is that not-found="ignore" is the workaround/patch of what you need. The real solution is clean the DB design. Please avoid a request about a workaround of a workaround when the real matter is a really bad DB design. 2010/3/2 Fabio Maulo > NH has the way to work with it... can you ac

[nhusers] Re: Lazyload a Component ?

2010-03-02 Thread Martin From
Thanks for the help. I just wanted to write a quick update to tell that it works perfectly with the newest version of nhibernate. On 1 Mar., 16:55, Diego Mijelshon wrote: > You can get the binaries > athttp://hornget.net/packages/orm/nhibernate/nhibernate-trunk, or checkout the > sources > fro

Re: [nhusers] Many-to-one in legacy db

2010-03-02 Thread Fabio Maulo
NH has the way to work with it... can you accept that it will be not efficient ? If so the way is: not-found="ignore" not-found="ignore" mean no FK and ignore invalid values (exactly what you have). not-found="ignore" is inefficient. NH should that... NH should this... yes is true but.. can you g

Re: [nhusers] Many-to-one in legacy db

2010-03-02 Thread Simon Laroche
I agree but the unsafe data is used by the other data access code which I cannot change (legacy library). I thought NH would be flexible enough for me to continue working using the same data until all the legacy code was replaced. Do you think a custom user type would allow me to work with the zér

Re: [nhusers] Many-to-one in legacy db

2010-03-02 Thread Simon Laroche
Are you talking about a null object ? On Tue, Mar 2, 2010 at 2:46 PM, John Davidson wrote: > How about a different null value in your database and code where you > replace 0 with -1? Then NHibernate should be able to work while you fix the > DB design. > > John Davidson > > > On Tue, Mar 2, 2010

[nhusers] Problem with nhibernate linq Expand() statements results not being cached with rest of results

2010-03-02 Thread Chuck Boyde
Some more cache related problems. I am having a problem getting the results of associated or child entities to be loaded into the nhibernate cache along with the root entity when using the Expand() method. The root entity loads fine though. So the following: var query = session.Linq();

Re: [nhusers] Many-to-one in legacy db

2010-03-02 Thread John Davidson
How about a different null value in your database and code where you replace 0 with -1? Then NHibernate should be able to work while you fix the DB design. John Davidson On Tue, Mar 2, 2010 at 2:08 PM, Simon Laroche wrote: > Hi Fabio, > > No FK but the database can be changed and will be changed

Re: [nhusers] Many-to-one in legacy db

2010-03-02 Thread Fabio Maulo
Well... the first step should be : remove unsafe data. In this specific case it mean: replace 0 (zero) with null. 2010/3/2 Simon Laroche > Hi Fabio, > > No FK but the database can be changed and will be changed but I plan to do > it piece by piece. So, I either make sure that we remove all the o

Re: [nhusers] Many-to-one in legacy db

2010-03-02 Thread Simon Laroche
Hi Fabio, No FK but the database can be changed and will be changed but I plan to do it piece by piece. So, I either make sure that we remove all the old data access code, alter the db and then switch to NH or I find a way to change NH's default behavior for the time being and then update and add

[nhusers] Re: many-to-many

2010-03-02 Thread Thommie
Thanks for the reply, have to check how to fix this, i use native too and mysql. On 25 Feb, 21:17, Rab wrote: > When I first used NHibernate, I discovered a bug in the Native > handler. > > I had two classes, Organisations, and Capabilities. These were many to > many mapped. I was using MySql, an

Re: [nhusers] Re: UnitOfWork and HttpContext

2010-03-02 Thread Socratees Samipillai
More relevant links. http://www.hanselman.com/blog/StoringThingsOnThreads.aspx http://www.hanselman.com/blog/ATaleOfTwoTechniquesTheThreadStaticAttributeAndSystemWebHttpContextCurrentItems.aspx http://integralpath.blogs.com/thinkingoutloud/2005/03/threadstatic_fu.html Socratees. On Tue, Mar 2, 2

[nhusers] Re: NHibernate Caching Dilemma

2010-03-02 Thread Kent Boogaart
@Fabio: I'd like to be, but you're making it difficult. You say I'm "lazy" and "don't have time to explain my problem", but that's the complete opposite of the truth. Perhaps you were too "lazy" to visit StackOverflow and read the problem? I can understand why you might be frustrated when people d

Re: [nhusers] Re: NHibernate Caching Dilemma

2010-03-02 Thread Fabio Maulo
be happy!! 2010/3/2 Kent Boogaart > Wow, haven't heard that one before. I've heard of cross-posting > though, which is also considered a strong discourtesy. Rock and a hard > place. > > Besides, I figured I was doing everyone a favor since the formatting > on StackOverflow is much easier to read

[nhusers] Re: NHibernate Caching Dilemma

2010-03-02 Thread Kent Boogaart
Wow, haven't heard that one before. I've heard of cross-posting though, which is also considered a strong discourtesy. Rock and a hard place. Besides, I figured I was doing everyone a favor since the formatting on StackOverflow is much easier to read than in here. And I think "lazy" is a stretch g

Re: [nhusers] Re: UnitOfWork and HttpContext

2010-03-02 Thread Socratees Samipillai
@Zorgoban, I found this thread on Microsoft.Public.Dotnet.Framework.ASP.net rather enlightening. http://groups.google.com/group/microsoft.public.dotnet.framework.aspnet/browse_frm/thread/cef5d88a2e3e26e1/85798178bdf7c0c8?q=asp.net+thread+agile&rnum=1&pli=1 Not sure if its of help to you though.

Re: [nhusers] Re: NHibernate Caching Dilemma

2010-03-02 Thread Fabio Maulo
a lazy support request is when a guy is too lazy to copy&paste the text of request and instead y send a link. You can be "lazy" for an answer because the answer is a courtesy but you can't be lazy in a request. Repeating my self: if you don't have time to explain your problem you can imagine how mu

Re: [nhusers] Many-to-one in legacy db

2010-03-02 Thread Fabio Maulo
so you don't have an FK there right ? and the "legacy" DB is untouchable because it was designed very well by an high-level expert, right ? 2010/3/2 Simon Laroche > Hi, > > We have a lagacy database where a null value in a many-to-one relation is > represented by à 0. What is the best to hav

Re: [nhusers] Re: UnitOfWork and HttpContext

2010-03-02 Thread John Davidson
That link from MSDN only shows major events. It is a heavily truncated subset and should not be used for architecture planning at the level you are working at. I have seen more complete lists (there are 2, but both are still just subsets and do not equal the complete ASP.NET pipeline). Take Piers

[nhusers] Re: UnitOfWork and HttpContext

2010-03-02 Thread Zorgoban
@Robert Rudduck: What a great article! This discourages the use of the Session as a member variable and trusting to be clean inside one request. But if you allways use the session inside a using() statement, you should be save. There might even be the possibility with the member variable if you ini

[nhusers] Re: UnitOfWork and HttpContext

2010-03-02 Thread Zorgoban
If I look at the lifecycles of either an ASP.Net Page or MVC Request, I really doubt any of those are spwaning multiple threads for one GET or POST. In the case of ASP.Net its not mentioned in the MSDN documentation: http://msdn.microsoft.com/en-us/library/ms178472.aspx. In case of MVC I couldnt qu

[nhusers] Many-to-one in legacy db

2010-03-02 Thread Simon Laroche
Hi, We have a lagacy database where a null value in a many-to-one relation is represented by à 0. What is the best to have NH replicate this behavior? Simon -- You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to nhus..

Re: [nhusers] UnitOfWork and HttpContext

2010-03-02 Thread Robert Rudduck
This link has a good explanation as well as experimental evidence: http://piers7.blogspot.com/2005/11/threadstatic-callcontext-and_02.html On Tue, Mar 2, 2010 at 8:28 AM, Angel Java Lopez wrote: > Source link? > > > On Tue, Mar 2, 2010 at 11:10 AM, Fabio Maulo wrote: > >> because MS said that y

Re: [nhusers] nhforge seems to be down

2010-03-02 Thread Fabio Maulo
Yes, there was a problem 2010/3/2 Simon Laroche > It's back now but it is super slow, > > Simon > > > On Tue, Mar 2, 2010 at 9:46 AM, Angel Java Lopez wrote: > >> It's working for me (from Argentina) >> http://nhforge.org >> >> >> On Tue, Mar 2, 2010 at 11:44 AM, Simon Laroche >> wrote: >> >>>

Re: [nhusers] nhforge seems to be down

2010-03-02 Thread Simon Laroche
It's back now but it is super slow, Simon On Tue, Mar 2, 2010 at 9:46 AM, Angel Java Lopez wrote: > It's working for me (from Argentina) > http://nhforge.org > > > On Tue, Mar 2, 2010 at 11:44 AM, Simon Laroche wrote: > >> Hi guys, >> >> The web site seems to be down >> >> -- > You received thi

Re: [nhusers] UnitOfWork and HttpContext

2010-03-02 Thread Fabio Maulo
Angel puf!!! I can't remember any link where I have read something... my SSD (my brain) has few free space. Perhaps something in the MSDN or in the Scott's blog (Scott Hanselman)... 2010/3/2 Angel Java Lopez > Source link? > > > On Tue, Mar 2, 2010 at 11:10 AM, Fabio Maulo wrote: > >> becau

Re: [nhusers] nhforge seems to be down

2010-03-02 Thread Angel Java Lopez
It's working for me (from Argentina) http://nhforge.org On Tue, Mar 2, 2010 at 11:44 AM, Simon Laroche wrote: > Hi guys, > > The web site seems to be down > > -- You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to nhus

[nhusers] nhforge seems to be down

2010-03-02 Thread Simon Laroche
Hi guys, The web site seems to be down Simon -- You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to nhus...@googlegroups.com. To unsubscribe from this group, send email to nhusers+unsubscr...@googlegroups.com. For mor

[nhusers] Re: NHibernate Caching Dilemma

2010-03-02 Thread Kent Boogaart
@Fabio: you've completely lost me, but I'll take your word for it... -- You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to nhus...@googlegroups.com. To unsubscribe from this group, send email to nhusers+unsubscr...@goo

Re: [nhusers] UnitOfWork and HttpContext

2010-03-02 Thread Angel Java Lopez
Source link? On Tue, Mar 2, 2010 at 11:10 AM, Fabio Maulo wrote: > because MS said that you may have more than one thread in a request. > > > -- You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to nhus...@googlegroups

Re: [nhusers] UnitOfWork and HttpContext

2010-03-02 Thread Diego Mijelshon
A request can use more than one thread. Diego On Tue, Mar 2, 2010 at 05:25, Zorgoban wrote: > Hello! > > I am implementing something like the UnitOfWork example from > > http://nhforge.org/wikis/patternsandpractices/nhibernate-and-the-unit-of-work-pattern.aspx > . > In this example, the Ses

Re: [nhusers] UnitOfWork and HttpContext

2010-03-02 Thread Fabio Maulo
because MS said that you may have more than one thread in a request. 2010/3/2 Zorgoban > Hello! > > I am implementing something like the UnitOfWork example from > > http://nhforge.org/wikis/patternsandpractices/nhibernate-and-the-unit-of-work-pattern.aspx > . > In this example, the Session is st

Re: [nhusers] Re: NHibernate Caching Dilemma

2010-03-02 Thread Fabio Maulo
you will see... 2010/3/2 Kent Boogaart > @Fabio: what? > > -- > You received this message because you are subscribed to the Google Groups > "nhusers" group. > To post to this group, send email to nhus...@googlegroups.com. > To unsubscribe from this group, send email to > nhusers+unsubscr...@goog