summaryrefslogtreecommitdiff
path: root/framework/DataAccess/SQLMap/Configuration
diff options
context:
space:
mode:
authorwei <>2006-06-12 03:10:47 +0000
committerwei <>2006-06-12 03:10:47 +0000
commit1c6f1f79d011579a158e87459040075331b636b7 (patch)
tree75236e04a5e2aaf9685b34ed7bed0f82e591bbb4 /framework/DataAccess/SQLMap/Configuration
parentf30c38fcc9d6cdfa7aafa5078a58645192c11974 (diff)
Minor updates.
Diffstat (limited to 'framework/DataAccess/SQLMap/Configuration')
-rw-r--r--framework/DataAccess/SQLMap/Configuration/TConfigDeserialize.php21
1 files changed, 14 insertions, 7 deletions
diff --git a/framework/DataAccess/SQLMap/Configuration/TConfigDeserialize.php b/framework/DataAccess/SQLMap/Configuration/TConfigDeserialize.php
index 9a44d1ec..ee8f1744 100644
--- a/framework/DataAccess/SQLMap/Configuration/TConfigDeserialize.php
+++ b/framework/DataAccess/SQLMap/Configuration/TConfigDeserialize.php
@@ -111,6 +111,7 @@ class TConfigDeserialize
$property->initialize($sqlMap, $resultMap);
$resultMap->addResultProperty($property);
}
+
$discriminator = null;
if(isset($node->discriminator))
{
@@ -118,18 +119,24 @@ class TConfigDeserialize
$this->loadConfiguration($discriminator, $node->discriminator, $file);
$discriminator->initMapping($sqlMap, $resultMap);
}
+
+
+
foreach($node->subMap as $subMapNode)
{
- if(is_null($discriminator))
- throw new TSqlMapConfigurationException(
- 'sqlmap_undefined_discriminator', $resultMap->getID(), $file);
- $subMap = new TSubMap;
- $this->loadConfiguration($subMap, $subMapNode, $file);
- $discriminator->add($subMap);
+ if(isset($subMapNode['value']))
+ {
+ if(is_null($discriminator))
+ throw new TSqlMapConfigurationException(
+ 'sqlmap_undefined_discriminator', $resultMap->getID(), $file);
+
+ $subMap = new TSubMap;
+ $this->loadConfiguration($subMap, $subMapNode, $file);
+ $discriminator->add($subMap);
+ }
}
if(!is_null($discriminator))
$resultMap->setDiscriminator($discriminator);
-
return $resultMap;
}