コード例 #1
0
 public void Fetch(CollectionFetchMode fetchMode)
 {
     if (fetchMode == null)
     {
         return;
     }
     mapping.fetch          = fetchMode.ToHbm();
     mapping.fetchSpecified = mapping.fetch != HbmCollectionFetchMode.Select;
 }
コード例 #2
0
 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());
 }
コード例 #3
0
 public void Fetch(CollectionFetchMode fetchMode)
 {
     CustomizersHolder.AddCustomizer(PropertyPath, (ICollectionPropertiesMapper x) => x.Fetch(fetchMode));
 }