[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
|
||||
*/
|
||||
public $reflFields;
|
||||
public $reflFields = array();
|
||||
|
||||
/**
|
||||
* The ID generator used for generating IDs for this class.
|
||||
|
|
|
@ -201,8 +201,12 @@ class ClassMetadataFactory
|
|||
} else if ($parent->isIdGeneratorTable()) {
|
||||
$class->getTableGeneratorDefinition($parent->getTableGeneratorDefinition());
|
||||
}
|
||||
$class->setIdGeneratorType($parent->generatorType);
|
||||
$class->setIdGenerator($parent->getIdGenerator());
|
||||
if ($generatorType = $parent->generatorType) {
|
||||
$class->setIdGeneratorType($generatorType);
|
||||
}
|
||||
if ($idGenerator = $parent->getIdGenerator()) {
|
||||
$class->setIdGenerator($idGenerator);
|
||||
}
|
||||
} else {
|
||||
$this->_completeIdGeneratorMapping($class);
|
||||
}
|
||||
|
@ -218,7 +222,9 @@ class ClassMetadataFactory
|
|||
$this->_evm->dispatchEvent(Events::loadClassMetadata, $eventArgs);
|
||||
}
|
||||
|
||||
$this->_generateStaticSql($class);
|
||||
if ( ! $class->isMappedSuperclass) {
|
||||
$this->_generateStaticSql($class);
|
||||
}
|
||||
|
||||
$this->_loadedMetadata[$className] = $class;
|
||||
|
||||
|
|
|
@ -22,7 +22,8 @@
|
|||
namespace Doctrine\ORM\Mapping\Driver;
|
||||
|
||||
use Doctrine\ORM\Mapping\ClassMetadata,
|
||||
Doctrine\Common\DoctrineException;
|
||||
Doctrine\Common\DoctrineException,
|
||||
Doctrine\ORM\Mapping\MappingException;
|
||||
|
||||
if ( ! class_exists('sfYaml', false)) {
|
||||
require_once __DIR__ . '/../../../../vendor/sfYaml/sfYaml.class.php';
|
||||
|
@ -152,23 +153,25 @@ class YamlDriver extends AbstractFileDriver
|
|||
}
|
||||
}
|
||||
|
||||
// Evaluate identifier settings
|
||||
foreach ($element['id'] as $name => $idElement) {
|
||||
$mapping = array(
|
||||
'id' => true,
|
||||
'fieldName' => $name,
|
||||
'type' => $idElement['type']
|
||||
);
|
||||
if (isset($element['id'])) {
|
||||
// Evaluate identifier settings
|
||||
foreach ($element['id'] as $name => $idElement) {
|
||||
$mapping = array(
|
||||
'id' => true,
|
||||
'fieldName' => $name,
|
||||
'type' => $idElement['type']
|
||||
);
|
||||
|
||||
if (isset($idElement['column'])) {
|
||||
$mapping['columnName'] = $idElement['column'];
|
||||
}
|
||||
if (isset($idElement['column'])) {
|
||||
$mapping['columnName'] = $idElement['column'];
|
||||
}
|
||||
|
||||
$metadata->mapField($mapping);
|
||||
$metadata->mapField($mapping);
|
||||
|
||||
if (isset($idElement['generator'])) {
|
||||
$metadata->setIdGeneratorType(constant('Doctrine\ORM\Mapping\ClassMetadata::GENERATOR_TYPE_'
|
||||
. $idElement['generator']['strategy']));
|
||||
if (isset($idElement['generator'])) {
|
||||
$metadata->setIdGeneratorType(constant('Doctrine\ORM\Mapping\ClassMetadata::GENERATOR_TYPE_'
|
||||
. strtoupper($idElement['generator']['strategy'])));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -86,7 +86,7 @@ class SchemaTool
|
|||
$sequences = array(); // Sequence SQL statements. Appended to $sql at the end.
|
||||
|
||||
foreach ($classes as $class) {
|
||||
if (isset($processedClasses[$class->name])) {
|
||||
if (isset($processedClasses[$class->name]) || $class->isMappedSuperclass) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue