OneToOneMapping IOneToOneMappingProvider.GetOneToOneMapping()
        {
            var mapping = new OneToOneMapping(attributes.CloneInner());

            mapping.ContainingEntityType = entity;

            if (!mapping.IsSpecified("Class"))
            {
                mapping.SetDefaultValue(x => x.Class, new TypeReference(typeof(TOther)));
            }

            if (!mapping.IsSpecified("Name"))
            {
                mapping.SetDefaultValue(x => x.Name, property.Name);
            }

            return(mapping);
        }
Esempio n. 2
0
 public new void Class <T>()
 {
     if (!mapping.IsSpecified("Class"))
     {
         mapping.Class = new TypeReference(typeof(T));
     }
 }
Esempio n. 3
0
 public bool IsSet(Member property)
 {
     return(mapping.IsSpecified(propertyMappings.Get(property)));
 }