aliozgur posted on September 22, 2008 12:07
During evolution of .NET related technologies (almost lasted a decade) Microsoft published bunch of experimental technologies, frameworks and packages which caused developers to feel a little bit confused. This confusion made developers feel uncomfortable about the future of these technologies and we simply preferred, to the extent we can survive, not to use new .NET related stuff. We had the feeling that we were fighting to find our way out of a huge dust cloud, I think even Microsoft felt a little bit exhausted and as a result was late to set a clear vision for all these technologies. But with the release of .NET framework 3.0 and 3.5 it seems that Microsoft managed to settle down a clear vision about the future of .NET development. I think next decade (by 2010) we will talk/hear about and develop software based on the following .NET related technologies.

Posted in: .NET Development  Tags:

Here is aother strange problem related with NHibernate

The Problem

I have a Parent class and two child classes Child1 and Child2 mapped to different tables on the database.
Lets assume that we specified cascade='all' for child bags defined on Parent.hbm.xml. Sample workflow of instantiating parent and child objects is as the following

- Create a parent object.
- Insert 2 Child1 instances to child1 bag
- Insert 3 Child2 instances to child2 bag.
- Flush the session
- Refresh parent object
- We get 6 instances for each child bag (child1 and child2). But we expect 2 Child1 instances in child1 bag and 3 Child2 instances in child2 bag.

Ther problem is : NHibernate performs left outer join on Child1 and Child2 tables when Refresh is called for the parent object. This is unaccaptable, I think NHibernate should initialize child collections with seperate selects commited to the database, or may be distinguish the duplicated child instances automatically in the collections. (using idbag instead of bag is not an option)

Download the test case

Requirements

Watch This


Posted in: .NET Development , C# , NHibernate  Tags:

I discovered this problem while developing a new system with the latest NHibernate.Burrow distribution (which in turn uses the latest NHibernate distribution).I spent some time Googling around to check if anyboy else met the same problem and found some entries but none of them specified exactly why this failure was happening and how we can solve this problem.
More...


Posted in: .NET Development , C# , NHibernate  Tags: