示例#1
0
        /// <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);
            }
        }
示例#2
0
        /// <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 );
            }
        }
示例#3
0
        /// <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);
                }
            }
        }
示例#4
0
        /// <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 );
                }
            }
        }