Esempio n. 1
0
        void InitialiseDefaults(Type containingEntityType)
        {
            mapping.ContainingEntityType = containingEntityType;

            if (!mapping.IsSpecified("Class"))
            {
                mapping.Class = new TypeReference(typeof(T));
            }
        }
        CompositeElementMapping ICompositeElementMappingProvider.GetCompositeElementMapping()
        {
            var mapping = new CompositeElementMapping(attributes.CloneInner());

            mapping.ContainingEntityType = entity;

            if (!mapping.IsSpecified("Class"))
            {
                mapping.Class = new TypeReference(typeof(T));
            }

            foreach (var property in properties)
            {
                mapping.AddProperty(property.GetPropertyMapping());
            }

            foreach (var reference in references)
            {
                mapping.AddReference(reference.GetManyToOneMapping());
            }

            return(mapping);
        }
Esempio n. 3
0
        void PopulateMapping(CompositeElementMapping mapping)
        {
            mapping.ContainingEntityType = entity;

            if (!mapping.IsSpecified("Class"))
            {
                mapping.Class = new TypeReference(typeof(T));
            }

            foreach (var property in properties)
            {
                mapping.AddProperty(property.GetPropertyMapping());
            }

            foreach (var reference in references)
            {
                mapping.AddReference(reference.GetManyToOneMapping());
            }

            foreach (var component in components)
            {
                mapping.AddCompositeElement(component.GetCompositeElementMapping());
            }
        }
Esempio n. 4
0
 public bool IsSet(Member property)
 {
     return(mapping.IsSpecified(mappedProperties.Get(property)));
 }