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); }
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()); } }
public bool IsSet(Member property) { return(mapping.IsSpecified(mappedProperties.Get(property))); }