Deep load of entity with two levels of nested collections brings wrong result when first collection mapped as bag.
In provided example I try to fetch specified blog with it's posts and with it's posts' comments (Blog->Posts->Comments). It works correctly when Blog->Posts mapped as set, but fails when Blog->Posts mapped as bag. I have provided tests for different combinations of bag-set mappings. Also tested different query methods: linq, query over and criteria api.
In my real model I need it mapped as bag, so mapping as a set is not a workarround for me.
SqlServer 2008 Express
Full test code: https://github.com/stanb/NHExperiments/tree/master/NHBugs