Your query example seems seems odd too. The variable `jobs` should be typed as IList<TAggregate> but then you try to access `jobs.Departments` - but `Departments` is hardly defined by the IList<T> interface, so what is really going on?
Den ons 16 dec. 2020 kl 11:27 skrev Oskar Berggren <[email protected] >: > Where is the HasMany() mapping? > > Also, you have put Inverse on the References() mapping. I don't think I've > ever tried that, I've only ever put Inverse() on the HasMany-side. > > Den ons 16 dec. 2020 kl 10:08 skrev Venkata Krishna Reddy Sangu < > [email protected]>: > >> Team, Any idea on this issue? >> Default left outer join is not getting created for Hasmany() mapping. >> Previous version prior to NH 5.3 is working fine. >> >> On Monday, December 14, 2020 at 11:08:12 PM UTC+5:30 Venkata Krishna >> Reddy Sangu wrote: >> >>> Hi Team, >>> I have a mapping like below. And Job has 'Department' as property. >>> References(x => x.Job) >>> .Column(tableMeta.Job_id) >>> .Not.LazyLoad().Inverse() >>> .Cascade.None(); >>> >>> Query as: >>> empIds - input integer ids >>> var jobs = _session.Query<TAggregate>() .Where(e => >>> empIds.Contains(e.EmployeeID)) >>> .ToList()); >>> var depts = jobs.Departments. >>> here departments coming as null. Because there is no eagar loading >>> happenings. >>> >>> How my mappings should be in order to generate left outer join for other >>> entities we used in the property. >>> >>> >>> -- >> You received this message because you are subscribed to the Google Groups >> "nhusers" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/nhusers/b0f49396-d6a3-406d-98de-404e0eeeea79n%40googlegroups.com >> <https://groups.google.com/d/msgid/nhusers/b0f49396-d6a3-406d-98de-404e0eeeea79n%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> > -- You received this message because you are subscribed to the Google Groups "nhusers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/nhusers/CAHOuc7PmKt1m9gfS8O8m-x91uq9Hk%3D57gFXNcDC0--8YvLzrpA%40mail.gmail.com.
