Esempio n. 1
0
        private CollectionLazy GetLazy(CollectionMemberInfoMetadata collection)
        {
            if (collection.Lazy)
            {
                return(CollectionLazy.Lazy);
            }

            return(CollectionLazy.NoLazy);
        }
Esempio n. 2
0
        private void MapCollection <TProperty>(CollectionMemberInfoMetadata member)
        {
            annotationsMap
            .Bag <TProperty>(
                member.Name,
                m =>
            {
                m.Inverse(member.Inverse);
                m.Lazy(GetLazy(member));
                AccessorHelper.SetAccessor(member, m);

                m.Cascade(Cascade.Merge | Cascade.DeleteOrphans);
                m.Key(k => k.Column(typeof(T).Name + "Id"));
            },
                r => r.OneToMany());
        }
Esempio n. 3
0
 private void InvokeMapCollection(CollectionMemberInfoMetadata property)
 {
     this
     .Invoke("MapCollection", new[] { GetCollectionGenericType(property.Type) }, property);
 }