From 362aea9c8764437119d09eb6343851db4298a035 Mon Sep 17 00:00:00 2001 From: "godzilla80@gmx.net" <> Date: Sat, 23 May 2009 07:52:15 +0000 Subject: Fixed Issue#161 - SqlMap add cache dependencies if TApplicationMode Debug/Normal --- framework/Data/SqlMap/Configuration/TSqlMapXmlConfiguration.php | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'framework/Data/SqlMap/Configuration') diff --git a/framework/Data/SqlMap/Configuration/TSqlMapXmlConfiguration.php b/framework/Data/SqlMap/Configuration/TSqlMapXmlConfiguration.php index 5854b21a..462b356f 100644 --- a/framework/Data/SqlMap/Configuration/TSqlMapXmlConfiguration.php +++ b/framework/Data/SqlMap/Configuration/TSqlMapXmlConfiguration.php @@ -349,6 +349,15 @@ class TSqlMapXmlMappingConfiguration extends TSqlMapXmlConfigBuilder $document = $this->loadXmlDocument($filename,$this->_xmlConfig); $this->_document=$document; + static $bCacheDependencies; + if($bCacheDependencies === null) + $bCacheDependencies = Prado::getApplication()->getMode() !== TApplicationMode::Performance; + + if($bCacheDependencies) + $this->_manager->getCacheDependencies() + ->getDependencies() + ->add(new TFileCacheDependency($filename)); + foreach($document->xpath('//resultMap') as $node) $this->loadResultMap($node); -- cgit v1.2.3