I’m using mapping by code in a new application and seeing some odd behavior with the convention model mapper. It’s selecting all but one of my 1..N relationships as a Bag and one as a Set. As far as I can see, they’re all declared basically the same way. More-over if I dont set up an event handler for BeforeMapSet, the appropriate BeforeMapManyToOne handler is never fired.
Share
The
XMLmapping is more explicit in this way and usually maps IList<> to<bag>andISetto<set>. There is an explanation, how the Fluent engine (from version 1.2) tries to do the same:https://github.com/jagregory/fluent-nhibernate/wiki/Fluent-mapping
(see section HasMany / one-to-many / Collection Types)
An extract from the link above:
So I would guess, that your “small differencies” in mapping could be hidden there