private void RemoveDuplicateMemberMapsFromSubClass(SuperClassMapModel model, SubClassMapModel subModel)
        {
            subModel.PersistentMemberMaps.RemoveAll(m => model.PersistentMemberMaps.Any(x => AreMembersEqual(m.Getter, x.Getter)));

            if(model.IdMap != null)
                subModel.PersistentMemberMaps.RemoveAll(m => AreMembersEqual(m.Getter, model.IdMap.Getter));

            if(model.ExtendedPropertiesMap != null)
                subModel.PersistentMemberMaps.RemoveAll(m => AreMembersEqual(m.Getter, model.ExtendedPropertiesMap.Getter));
        }
        private void ProcessSuperClass(SuperClassMapModel model)
        {
            if (model.IdMap != null)
                model.PersistentMemberMaps.RemoveAll(m => AreMembersEqual(m.Getter, model.IdMap.Getter));

            if (model.ExtendedPropertiesMap != null)
                model.PersistentMemberMaps.RemoveAll(m => AreMembersEqual(m.Getter, model.ExtendedPropertiesMap.Getter));

            foreach (var subModel in model.SubClassMaps)
                this.RemoveDuplicateMemberMapsFromSubClass(model, subModel);
        }
Пример #3
0
        private void ProcessSuperClass(SuperClassMapModel model)
        {
            this.ProcessClass(model);

            if (model.ExtendedPropertiesMap == null)
            {
                var convention = this.conventions.GetExtendedPropertiesConvention(model.Type);

                if (convention.HasExtendedProperties(model.Type))
                    model.ExtendedPropertiesMap = convention.GetExtendedPropertiesMapModel(model.Type);
            }

            if (model.IdMap == null)
            {
                var convention = this.conventions.GetIdConvention(model.Type);

                if (convention.HasId(model.Type))
                    model.IdMap = convention.GetIdMapModel(model.Type);
            }
        }