Hello Sergey and others,
You were right Sergey something else was wrong and caused strange, ondocumented, behaviuor of NHibernate (for framework 2.x). After creating my mapping-files and classes I started using them. At first I received a lot of mapping errors. When there weren't any mapping errors I concluded that the mapping-files were correct. THIS was my mistake.
1) I tested with data that caused mapping problems;
2) Corrected the mapping/class errors;
3) Started working with (2) -> everything fine;
4) Started using more data -> new mapping errors concealed as strange NHibernate messages
5) Flead through the mapping-files/classes -> found some extra errors -> corrected them
6) Suddenly lazy loading worked as you expected!! Thank you Sergey for your tip!
Stefan
|