private CollectionLazy GetLazy(CollectionMemberInfoMetadata collection) { if (collection.Lazy) { return(CollectionLazy.Lazy); } return(CollectionLazy.NoLazy); }
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()); }
private void InvokeMapCollection(CollectionMemberInfoMetadata property) { this .Invoke("MapCollection", new[] { GetCollectionGenericType(property.Type) }, property); }