public void Fetch(CollectionFetchMode fetchMode) { if (fetchMode == null) { return; } mapping.fetch = fetchMode.ToHbm(); mapping.fetchSpecified = mapping.fetch != HbmCollectionFetchMode.Select; }
private static void MapList <TParent, TElement>(IClassMapper <TParent> rc, Expression <Func <TParent, IEnumerable <TElement> > > expression, CollectionFetchMode fetchMode = null, Action <IBagPropertiesMapper <TParent, TElement> > mapper = null) where TParent : class { rc.Bag( expression, m => { m.Key( km => { km.Column( ckm => { ckm.Name("ParentId"); }); km.ForeignKey("none"); }); m.Cascade(Mapping.ByCode.Cascade.All); if (fetchMode != null) { m.Fetch(fetchMode); } mapper?.Invoke(m); }, a => a.OneToMany()); }
public void Fetch(CollectionFetchMode fetchMode) { CustomizersHolder.AddCustomizer(PropertyPath, (ICollectionPropertiesMapper x) => x.Fetch(fetchMode)); }