/// <summary> Removes the sync logic for member _suppliers</summary>
		/// <param name="signalRelatedEntity">If set to true, it will call the related entity's UnsetRelatedEntity method</param>
		/// <param name="resetFKFields">if set to true it will also reset the FK fields pointing to the related entity</param>
		private void DesetupSyncSuppliers(bool signalRelatedEntity, bool resetFKFields)
		{
			this.PerformDesetupSyncRelatedEntity( _suppliers, new PropertyChangedEventHandler( OnSuppliersPropertyChanged ), "Suppliers", NW26.RelationClasses.StaticProductsRelations.SuppliersEntityUsingSupplierIdStatic, true, signalRelatedEntity, "Products", resetFKFields, new int[] { (int)ProductsFieldIndex.SupplierId } );
			_suppliers = null;
		}
		/// <summary> setups the sync logic for member _suppliers</summary>
		/// <param name="relatedEntity">Instance to set as the related entity of type entityType</param>
		private void SetupSyncSuppliers(IEntityCore relatedEntity)
		{
			if(_suppliers!=relatedEntity)
			{
				DesetupSyncSuppliers(true, true);
				_suppliers = (SuppliersEntity)relatedEntity;
				this.PerformSetupSyncRelatedEntity( _suppliers, new PropertyChangedEventHandler( OnSuppliersPropertyChanged ), "Suppliers", NW26.RelationClasses.StaticProductsRelations.SuppliersEntityUsingSupplierIdStatic, true, new string[] {  } );
			}
		}
		protected ProductsEntity(SerializationInfo info, StreamingContext context) : base(info, context)
		{
			if(SerializationHelper.Optimization != SerializationOptimization.Fast) 
			{
				_orderDetails = (EntityCollection<OrderDetailsEntity>)info.GetValue("_orderDetails", typeof(EntityCollection<OrderDetailsEntity>));
				_categories = (CategoriesEntity)info.GetValue("_categories", typeof(CategoriesEntity));
				if(_categories!=null)
				{
					_categories.AfterSave+=new EventHandler(OnEntityAfterSave);
				}
				_suppliers = (SuppliersEntity)info.GetValue("_suppliers", typeof(SuppliersEntity));
				if(_suppliers!=null)
				{
					_suppliers.AfterSave+=new EventHandler(OnEntityAfterSave);
				}
				this.FixupDeserialization(FieldInfoProviderSingleton.GetInstance());
			}
			// __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor
			// __LLBLGENPRO_USER_CODE_REGION_END
			
		}