summaryrefslogtreecommitdiff
path: root/framework/Data/SqlMap/Configuration
diff options
context:
space:
mode:
authorgodzilla80@gmx.net <>2009-05-23 07:52:15 +0000
committergodzilla80@gmx.net <>2009-05-23 07:52:15 +0000
commit362aea9c8764437119d09eb6343851db4298a035 (patch)
tree449e390bfb592336ed13e350f6dac38f454b2c4d /framework/Data/SqlMap/Configuration
parente4587335b8c79bc2dc726da4f39ef43a0034247f (diff)
Fixed Issue#161 - SqlMap add cache dependencies if TApplicationMode Debug/Normal
Diffstat (limited to 'framework/Data/SqlMap/Configuration')
-rw-r--r--framework/Data/SqlMap/Configuration/TSqlMapXmlConfiguration.php9
1 files changed, 9 insertions, 0 deletions
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);