Quote:
Lazy loading is not the answer becuase I want to pre-load all of my nodes with one SQL statement. I don't want to hit the database each time I use nodes in my class instance
One school of thought in mapping the object graph is that all collections are lazily loaded. Then using HQL within a DAO pattern, you can create methods that instantiate the object and its "customized" graph using eager fetching and the various params that you can associate with the HQL (batch size, etc). So, in essence, I politely disagree with your statement and posit that highly customized HQL wrapped in a DAO might be the answer to your need.
Using this strategy, you never really end up paying the penalty of lazily loading an entire collection if your HQL is correct. The only penalty you pay is the need to write customized HQL methods for each "instantiation" based on whatever customized obect graph you might need in the particular instance.
Also, I would try and stay away from using the terminology of "Property" for a m-1/m-m/1-m collection association. I think, in this instance, it has added a bit of confusion. the H3 feature is specifically addressing a Property like "string Name", or "int ID" and not "IList children."
Selective pre-loading of many-to-one properties already exists in my opinion.
Quote:
Just out of curiosity, are there any large enterprise systems out there that have been written exclusively with (N)Hibernate? Do any of these systems need to operate in an environment where scalability is a very important requirement? For example, do any of these systems need to accomodate 1000 users hitting the same functionality all within the space of one minute?
I currently have a system, written entirely on NH that operates in an environment where scalability is important. On a single server, dual p4 running Win2003/IIS/SQL2000 _on the same box_ can handle over 1000 requests per second to the same "feature" -- our most complex feature-- without really breaking a sweat. In fact, we've maxed out the gigE card before maxing out the processor or internal raid. This is on a development machine and we don't even have the second-level cache enabled on that box. In our production envirnoment we can handle much more since the IIS functions are separated from the application functions separated from the db functions and the jcs cache is in use.
Quote:
This is the real world. This is what an ORM needs to do in order to be usable in highly demanding environments.
I can understand your frustration but seriously, Hibernate is the de facto standard for ORM in the Java space. Mike, Sergey, et al are doing their best to port that code base over to .NET. What this system really needs are more developers. I personally am hoping to devote some of our team development cycles once our app is finished. More developers would be a tremendous help to this platform. NHibernate will be solid, it is in beta form at the moment so perhaps it just isn't ready for your envirnoment.