예제 #1
0
        public void Map(ClassMappingBase classMap, Member member)
        {
            var mapping = new ComponentMapping(ComponentType.Component)
            {
                Name   = member.Name,
                Member = member,
                ContainingEntityType = classMap.Type,
                Type         = member.PropertyType,
                ColumnPrefix = cfg.GetComponentColumnPrefix(member)
            };

            if (member.IsProperty && !member.CanWrite)
            {
                mapping.Access = cfg.GetAccessStrategyForReadOnlyProperty(member).ToString();
            }

            mapper.FlagAsMapped(member.PropertyType);
            mapper.MergeMap(member.PropertyType, mapping, new List <Member>());

            classMap.AddComponent(mapping);
        }