SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'entity_id' cannot be null, query was: INSERT INTO `enterprise_targetrule_index_upsell` (`entity_id`, `store_id`, `customer_group_id`, `customer_segment_id`) VALUES (?, ?, ?, ?)

#0 /data/www/magento/htdocs/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#1 /data/www/magento/htdocs/app/code/core/Zend/Db/Statement.php(291): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#2 /data/www/magento/htdocs/lib/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute(Array)
#3 /data/www/magento/htdocs/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('INSERT INTO `en...', Array)
#4 /data/www/magento/htdocs/lib/Varien/Db/Adapter/Pdo/Mysql.php(428): Zend_Db_Adapter_Pdo_Abstract->query('INSERT INTO `en...', Array)
#5 /data/www/magento/htdocs/lib/Zend/Db/Adapter/Abstract.php(576): Varien_Db_Adapter_Pdo_Mysql->query('INSERT INTO `en...', Array)
#6 /data/www/magento/htdocs/app/code/core/Enterprise/TargetRule/Model/Resource/Index/Abstract.php(213): Zend_Db_Adapter_Abstract->insert('enterprise_targ...', Array)
#7 /data/www/magento/htdocs/app/code/core/Enterprise/TargetRule/Model/Resource/Index.php(166): Enterprise_TargetRule_Model_Resource_Index_Abstract->saveResultForCustomerSegments(Object(Enterprise_TargetRule_Model_Index), 0, Array)
#8 /data/www/magento/htdocs/app/code/core/Enterprise/TargetRule/Model/Index.php(264): Enterprise_TargetRule_Model_Resource_Index->getProductIds(Object(Enterprise_TargetRule_Model_Index))
#9 /data/www/magento/htdocs/app/code/core/Enterprise/TargetRule/Block/Catalog/Product/List/Abstract.php(254): Enterprise_TargetRule_Model_Index->getProductIds()
#10 /data/www/magento/htdocs/app/code/core/Enterprise/TargetRule/Block/Catalog/Product/List/Abstract.php(319): Enterprise_TargetRule_Block_Catalog_Product_List_Abstract->_getTargetRuleProductIds()
#11 /data/www/magento/htdocs/app/code/core/Enterprise/TargetRule/Block/Catalog/Product/List/Upsell.php(89): Enterprise_TargetRule_Block_Catalog_Product_List_Abstract->getAllIds()
#12 /data/www/magento/htdocs/app/code/core/Enterprise/PageCache/Model/Container/CatalogProductItem.php(224): Enterprise_TargetRule_Block_Catalog_Product_List_Upsell->getAllIds()
#13 /data/www/magento/htdocs/app/code/core/Enterprise/PageCache/Model/Container/CatalogProductItem.php(245): Enterprise_PageCache_Model_Container_CatalogProductItem->_prepareListItems()
#14 /data/www/magento/htdocs/app/code/core/Enterprise/PageCache/controllers/RequestController.php(38): Enterprise_PageCache_Model_Container_CatalogProductItem->applyInApp('...')
#15 /data/www/magento/htdocs/app/code/local/Mage/Core/Controller/Varien/Action.php(418): Enterprise_PageCache_RequestController->processAction()
#16 /data/www/magento/htdocs/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('process')
#17 /data/www/magento/htdocs/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#18 /data/www/magento/htdocs/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#19 /data/www/magento/htdocs/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#20 /data/www/magento/htdocs/index.php(126): Mage::run('tissot', 'store')
#21 {main}