[2.0] Fixes for some strict standards notices and other various things
This commit is contained in:
parent
8c5887d05d
commit
01d6a61a90
4 changed files with 29 additions and 20 deletions
|
@ -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
|
||||||
} 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
|
||||||
$this->_evm->dispatchEvent(Events::loadClassMetadata, $eventArgs);
|
$this->_evm->dispatchEvent(Events::loadClassMetadata, $eventArgs);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->_generateStaticSql($class);
|
if ( ! $class->isMappedSuperclass) {
|
||||||
|
$this->_generateStaticSql($class);
|
||||||
|
}
|
||||||
|
|
||||||
$this->_loadedMetadata[$className] = $class;
|
$this->_loadedMetadata[$className] = $class;
|
||||||
|
|
||||||
|
|
|
@ -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,23 +153,25 @@ class YamlDriver extends AbstractFileDriver
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Evaluate identifier settings
|
if (isset($element['id'])) {
|
||||||
foreach ($element['id'] as $name => $idElement) {
|
// Evaluate identifier settings
|
||||||
$mapping = array(
|
foreach ($element['id'] as $name => $idElement) {
|
||||||
'id' => true,
|
$mapping = array(
|
||||||
'fieldName' => $name,
|
'id' => true,
|
||||||
'type' => $idElement['type']
|
'fieldName' => $name,
|
||||||
);
|
'type' => $idElement['type']
|
||||||
|
);
|
||||||
|
|
||||||
if (isset($idElement['column'])) {
|
if (isset($idElement['column'])) {
|
||||||
$mapping['columnName'] = $idElement['column'];
|
$mapping['columnName'] = $idElement['column'];
|
||||||
}
|
}
|
||||||
|
|
||||||
$metadata->mapField($mapping);
|
$metadata->mapField($mapping);
|
||||||
|
|
||||||
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
|
||||||
$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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue