/// <summary> /// Applies Foriegn key based on type. /// </summary> /// <param name="instance">The instance.</param> public void Apply(IComponentInstance instance) { var entityType = instance.EntityType; if (!entityType.IsNHibernateComponent()) { var mapping = instance.ConvertToIComponentMapping(); CreateForeignKeys(mapping, entityType); } }
/// <summary> /// Creates Foreign Key indexes for components. /// </summary> /// <param name="instance">The instance.</param> public void Apply( IComponentInstance instance ) { var entityType = instance.EntityType; if ( !entityType.IsNHibernateComponent () ) { var mapping = instance.ConvertToIComponentMapping (); CreateForeignKeyIndexes ( mapping, entityType ); } }
/// <summary> /// Applies nullablity based on type. /// </summary> /// <param name="instance">The instance.</param> public void Apply(IComponentInstance instance) { var entityType = instance.EntityType; if (!entityType.IsNHibernateComponent()) { var rootComponentMember = instance.Property; if (!rootComponentMember.IsDbNullable()) { var mapping = instance.ConvertToIComponentMapping(); ProcessSettingNotNullable(mapping); } } }
/// <summary> /// Applies nullablity based on type. /// </summary> /// <param name="instance">The instance.</param> public void Apply( IComponentInstance instance ) { var entityType = instance.EntityType; if ( !entityType.IsNHibernateComponent () ) { var rootComponentMember = instance.Property; if ( !rootComponentMember.IsDbNullable () ) { var mapping = instance.ConvertToIComponentMapping (); ProcessSettingNotNullable ( mapping ); } } }