Commit 01d6a61a authored by jwage's avatar jwage

[2.0] Fixes for some strict standards notices and other various things

parent 8c5887d0
...@@ -358,7 +358,7 @@ final class ClassMetadata ...@@ -358,7 +358,7 @@ final class ClassMetadata
* *
* @var array * @var array
*/ */
public $reflFields; public $reflFields = array();
/** /**
* The ID generator used for generating IDs for this class. * The ID generator used for generating IDs for this class.
......
...@@ -201,8 +201,12 @@ class ClassMetadataFactory ...@@ -201,8 +201,12 @@ class ClassMetadataFactory
} else if ($parent->isIdGeneratorTable()) { } else if ($parent->isIdGeneratorTable()) {
$class->getTableGeneratorDefinition($parent->getTableGeneratorDefinition()); $class->getTableGeneratorDefinition($parent->getTableGeneratorDefinition());
} }
$class->setIdGeneratorType($parent->generatorType); if ($generatorType = $parent->generatorType) {
$class->setIdGenerator($parent->getIdGenerator()); $class->setIdGeneratorType($generatorType);
}
if ($idGenerator = $parent->getIdGenerator()) {
$class->setIdGenerator($idGenerator);
}
} else { } else {
$this->_completeIdGeneratorMapping($class); $this->_completeIdGeneratorMapping($class);
} }
...@@ -218,7 +222,9 @@ class ClassMetadataFactory ...@@ -218,7 +222,9 @@ class ClassMetadataFactory
$this->_evm->dispatchEvent(Events::loadClassMetadata, $eventArgs); $this->_evm->dispatchEvent(Events::loadClassMetadata, $eventArgs);
} }
if ( ! $class->isMappedSuperclass) {
$this->_generateStaticSql($class); $this->_generateStaticSql($class);
}
$this->_loadedMetadata[$className] = $class; $this->_loadedMetadata[$className] = $class;
......
...@@ -22,7 +22,8 @@ ...@@ -22,7 +22,8 @@
namespace Doctrine\ORM\Mapping\Driver; namespace Doctrine\ORM\Mapping\Driver;
use Doctrine\ORM\Mapping\ClassMetadata, use Doctrine\ORM\Mapping\ClassMetadata,
Doctrine\Common\DoctrineException; Doctrine\Common\DoctrineException,
Doctrine\ORM\Mapping\MappingException;
if ( ! class_exists('sfYaml', false)) { if ( ! class_exists('sfYaml', false)) {
require_once __DIR__ . '/../../../../vendor/sfYaml/sfYaml.class.php'; require_once __DIR__ . '/../../../../vendor/sfYaml/sfYaml.class.php';
...@@ -152,6 +153,7 @@ class YamlDriver extends AbstractFileDriver ...@@ -152,6 +153,7 @@ class YamlDriver extends AbstractFileDriver
} }
} }
if (isset($element['id'])) {
// Evaluate identifier settings // Evaluate identifier settings
foreach ($element['id'] as $name => $idElement) { foreach ($element['id'] as $name => $idElement) {
$mapping = array( $mapping = array(
...@@ -168,7 +170,8 @@ class YamlDriver extends AbstractFileDriver ...@@ -168,7 +170,8 @@ class YamlDriver extends AbstractFileDriver
if (isset($idElement['generator'])) { if (isset($idElement['generator'])) {
$metadata->setIdGeneratorType(constant('Doctrine\ORM\Mapping\ClassMetadata::GENERATOR_TYPE_' $metadata->setIdGeneratorType(constant('Doctrine\ORM\Mapping\ClassMetadata::GENERATOR_TYPE_'
. $idElement['generator']['strategy'])); . strtoupper($idElement['generator']['strategy'])));
}
} }
} }
......
...@@ -86,7 +86,7 @@ class SchemaTool ...@@ -86,7 +86,7 @@ class SchemaTool
$sequences = array(); // Sequence SQL statements. Appended to $sql at the end. $sequences = array(); // Sequence SQL statements. Appended to $sql at the end.
foreach ($classes as $class) { foreach ($classes as $class) {
if (isset($processedClasses[$class->name])) { if (isset($processedClasses[$class->name]) || $class->isMappedSuperclass) {
continue; continue;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment