Fixed typos
This commit is contained in:
parent
399584db4c
commit
a2cd0f5804
@ -126,7 +126,7 @@ from 2.0 have to configure the annotation driver if they don't use `Configuratio
|
||||
$config->setMetadataDriverImpl($driver);
|
||||
|
||||
|
||||
## Scalar mappings can now be ommitted from DQL result
|
||||
## Scalar mappings can now be omitted from DQL result
|
||||
|
||||
You are now allowed to mark scalar SELECT expressions as HIDDEN an they are not hydrated anymore.
|
||||
Example:
|
||||
@ -307,7 +307,7 @@ them for batch updates like SchemaTool and other commands. However the
|
||||
annotations driver being a default driver does not really help that much
|
||||
anyways.
|
||||
|
||||
Therefore we decided to break backwards compability in this issue and drop
|
||||
Therefore we decided to break backwards compatibility in this issue and drop
|
||||
the support for Annotations as Default Driver and require our users to
|
||||
specify the driver explicitly (which allows us to ask for the path to all
|
||||
entities).
|
||||
@ -366,7 +366,7 @@ apologize for the inconvenience.
|
||||
## Default Property for Field Mappings
|
||||
|
||||
The "default" option for database column defaults has been removed. If desired, database column defaults can
|
||||
be implemented by using the columnDefinition attribute of the @Column annotation (or the approriate XML and YAML equivalents).
|
||||
be implemented by using the columnDefinition attribute of the @Column annotation (or the appropriate XML and YAML equivalents).
|
||||
Prefer PHP default values, if possible.
|
||||
|
||||
## Selecting Partial Objects
|
||||
@ -451,7 +451,7 @@ With new required method AbstractTask::buildDocumentation, its implementation de
|
||||
|
||||
* "doctrine schema-tool --drop" now always drops the complete database instead of
|
||||
only those tables defined by the current database model. The previous method had
|
||||
problems when foreign keys of orphaned tables pointed to tables that were schedulded
|
||||
problems when foreign keys of orphaned tables pointed to tables that were scheduled
|
||||
for deletion.
|
||||
* Use "doctrine schema-tool --update" to get a save incremental update for your
|
||||
database schema without deleting any unused tables, sequences or foreign keys.
|
||||
|
@ -64,5 +64,5 @@ object or implement the __sleep() magic method on your entity.
|
||||
|
||||
When you called detach on your objects they get "unmanaged" with that
|
||||
entity manager. This means you cannot use them as part of write operations
|
||||
during ``EntityManagr#flush()`` anymore in this request.
|
||||
during ``EntityManager#flush()`` anymore in this request.
|
||||
|
||||
|
@ -162,7 +162,7 @@ is supposed to kick-start you, but not towards 100%.
|
||||
Why does the EntityGenerator not generate inheritance correctly?
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Just from the details of the discriminator map the EntityGenerator cannot guess the inheritance hierachy.
|
||||
Just from the details of the discriminator map the EntityGenerator cannot guess the inheritance hierarchy.
|
||||
This is why the generation of inherited entities does not fully work. You have to adjust some additional
|
||||
code to get this one working correctly.
|
||||
|
||||
|
@ -689,7 +689,7 @@ interchangeably, independent of in-memory or sql-backed collections.
|
||||
*/
|
||||
public function setMaxResults($maxResults);
|
||||
public function getOrderings();
|
||||
public function getWhereExpresion();
|
||||
public function getWhereExpression();
|
||||
public function getFirstResult();
|
||||
public function getMaxResults();
|
||||
}
|
||||
|
@ -19,7 +19,7 @@ the ID fields have to have their values set before you call ``EntityManager#pers
|
||||
Primitive Types only
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Even in version 2.0 you can have composite keys as long as they only consist of the primative types
|
||||
Even in version 2.0 you can have composite keys as long as they only consist of the primitive types
|
||||
``integer`` and ``string``. Suppose you want to create a database of cars and use the model-name
|
||||
and year of production as primary keys:
|
||||
|
||||
@ -129,7 +129,7 @@ of one or many parent entities.
|
||||
|
||||
- Dynamic Attributes of an Entity (for example Article). Each Article has many
|
||||
attributes with primary key "article_id" and "attribute_name".
|
||||
- Address object of a Person, the primary key of the adress is "user_id". This is not a case of a composite primary
|
||||
- Address object of a Person, the primary key of the address is "user_id". This is not a case of a composite primary
|
||||
key, but the identity is derived through a foreign entity and a foreign key.
|
||||
- Join Tables with metadata can be modelled as Entity, for example connections between two articles
|
||||
with a little description and a score.
|
||||
|
@ -386,7 +386,7 @@ abstract class AbstractQuery
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines a cache driver to be used for caching result sets and implictly enables caching.
|
||||
* Defines a cache driver to be used for caching result sets and implicitly enables caching.
|
||||
*
|
||||
* @param \Doctrine\Common\Cache\Cache|null $resultCacheDriver Cache driver
|
||||
*
|
||||
|
@ -122,7 +122,7 @@ final class Events
|
||||
|
||||
/**
|
||||
* The preFlush event occurs when the EntityManager#flush() operation is invoked,
|
||||
* but before any changes to managed entites have been calculated. This event is
|
||||
* but before any changes to managed entities have been calculated. This event is
|
||||
* always raised right after EntityManager#flush() call.
|
||||
*/
|
||||
const preFlush = 'preFlush';
|
||||
|
@ -168,7 +168,7 @@ abstract class AbstractHydrator
|
||||
}
|
||||
|
||||
/**
|
||||
* Excutes one-time preparation tasks, once each time hydration is started
|
||||
* Executes one-time preparation tasks, once each time hydration is started
|
||||
* through {@link hydrateAll} or {@link iterate()}.
|
||||
*
|
||||
* @return void
|
||||
@ -178,7 +178,7 @@ abstract class AbstractHydrator
|
||||
}
|
||||
|
||||
/**
|
||||
* Excutes one-time cleanup tasks at the end of a hydration that was initiated
|
||||
* Executes one-time cleanup tasks at the end of a hydration that was initiated
|
||||
* through {@link hydrateAll} or {@link iterate()}.
|
||||
*
|
||||
* @return void
|
||||
@ -223,7 +223,7 @@ abstract class AbstractHydrator
|
||||
* Puts the elements of a result row into a new array, grouped by the dql alias
|
||||
* they belong to. The column names in the result set are mapped to their
|
||||
* field names during this procedure as well as any necessary conversions on
|
||||
* the values applied. Scalar values are kept in a specfic key 'scalars'.
|
||||
* the values applied. Scalar values are kept in a specific key 'scalars'.
|
||||
*
|
||||
* @param array $data SQL Result Row.
|
||||
* @param array &$cache Cache for column to field result information.
|
||||
@ -321,7 +321,7 @@ abstract class AbstractHydrator
|
||||
}
|
||||
|
||||
// in an inheritance hierarchy the same field could be defined several times.
|
||||
// We overwrite this value so long we dont have a non-null value, that value we keep.
|
||||
// We overwrite this value so long we don't have a non-null value, that value we keep.
|
||||
// Per definition it cannot be that a field is defined several times and has several values.
|
||||
if (isset($rowData[$dqlAlias][$cache[$key]['fieldName']]) && $value === null) {
|
||||
continue;
|
||||
|
@ -49,7 +49,7 @@ class HydrationException extends \Doctrine\ORM\ORMException
|
||||
public static function emptyDiscriminatorValue($dqlAlias)
|
||||
{
|
||||
return new self("The DQL alias '" . $dqlAlias . "' contains an entity ".
|
||||
"of an inheritance hierachy with an empty discriminator value. This means " .
|
||||
"of an inheritance hierarchy with an empty discriminator value. This means " .
|
||||
"that the database contains inconsistent data with an empty " .
|
||||
"discriminator value in a table row."
|
||||
);
|
||||
|
@ -200,7 +200,7 @@ class AssociationBuilder
|
||||
} else if ($this->type == ClassMetadata::ONE_TO_ONE) {
|
||||
$cm->mapOneToOne($mapping);
|
||||
} else {
|
||||
throw new \InvalidArgumentException("Type should be a ToOne Assocation here");
|
||||
throw new \InvalidArgumentException("Type should be a ToOne Association here");
|
||||
}
|
||||
return $this->builder;
|
||||
}
|
||||
|
@ -163,7 +163,7 @@ class ClassMetadataBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets class as root of a joined table inheritance hierachy.
|
||||
* Sets class as root of a joined table inheritance hierarchy.
|
||||
*
|
||||
* @return ClassMetadataBuilder
|
||||
*/
|
||||
@ -175,7 +175,7 @@ class ClassMetadataBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets class as root of a single table inheritance hierachy.
|
||||
* Sets class as root of a single table inheritance hierarchy.
|
||||
*
|
||||
* @return ClassMetadataBuilder
|
||||
*/
|
||||
@ -207,7 +207,7 @@ class ClassMetadataBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a subclass to this inheritance hierachy.
|
||||
* Adds a subclass to this inheritance hierarchy.
|
||||
*
|
||||
* @param string $name
|
||||
* @param string $class
|
||||
@ -319,7 +319,7 @@ class ClassMetadataBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a ManyToOne Assocation Builder.
|
||||
* Creates a ManyToOne Association Builder.
|
||||
*
|
||||
* Note: This method does not add the association, you have to call build() on the AssociationBuilder.
|
||||
*
|
||||
@ -361,7 +361,7 @@ class ClassMetadataBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds simple inverse one-to-one assocation.
|
||||
* Adds simple inverse one-to-one association.
|
||||
*
|
||||
* @param string $name
|
||||
* @param string $targetEntity
|
||||
@ -378,7 +378,7 @@ class ClassMetadataBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds simple owning one-to-one assocation.
|
||||
* Adds simple owning one-to-one association.
|
||||
*
|
||||
* @param string $name
|
||||
* @param string $targetEntity
|
||||
@ -398,7 +398,7 @@ class ClassMetadataBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a ManyToMany Assocation Builder.
|
||||
* Creates a ManyToMany Association Builder.
|
||||
*
|
||||
* @param string $name
|
||||
* @param string $targetEntity
|
||||
@ -418,7 +418,7 @@ class ClassMetadataBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a simple owning many to many assocation.
|
||||
* Adds a simple owning many to many association.
|
||||
*
|
||||
* @param string $name
|
||||
* @param string $targetEntity
|
||||
@ -438,7 +438,7 @@ class ClassMetadataBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a simple inverse many to many assocation.
|
||||
* Adds a simple inverse many to many association.
|
||||
*
|
||||
* @param string $name
|
||||
* @param string $targetEntity
|
||||
@ -455,7 +455,7 @@ class ClassMetadataBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a one to many assocation builder.
|
||||
* Creates a one to many association builder.
|
||||
*
|
||||
* @param string $name
|
||||
* @param string $targetEntity
|
||||
@ -475,7 +475,7 @@ class ClassMetadataBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds simple OneToMany assocation.
|
||||
* Adds simple OneToMany association.
|
||||
*
|
||||
* @param string $name
|
||||
* @param string $targetEntity
|
||||
|
@ -193,7 +193,7 @@ class ClassMetadataFactory extends AbstractClassMetadataFactory
|
||||
}
|
||||
|
||||
$class->validateIdentifier();
|
||||
$class->validateAssocations();
|
||||
$class->validateAssociations();
|
||||
$class->validateLifecycleCallbacks($this->getReflectionService());
|
||||
|
||||
// verify inheritance
|
||||
@ -319,7 +319,7 @@ class ClassMetadataFactory extends AbstractClassMetadataFactory
|
||||
foreach ($parentClass->associationMappings as $field => $mapping) {
|
||||
if ($parentClass->isMappedSuperclass) {
|
||||
if ($mapping['type'] & ClassMetadata::TO_MANY && !$mapping['isOwningSide']) {
|
||||
throw MappingException::illegalToManyAssocationOnMappedSuperclass($parentClass->name, $field);
|
||||
throw MappingException::illegalToManyAssociationOnMappedSuperclass($parentClass->name, $field);
|
||||
}
|
||||
$mapping['sourceEntity'] = $subClass->name;
|
||||
}
|
||||
|
@ -509,7 +509,7 @@ class ClassMetadataInfo implements ClassMetadata
|
||||
public $isIdentifierComposite = false;
|
||||
|
||||
/**
|
||||
* READ-ONLY: Flag indicating wheather the identifier/primary key contains at least one foreign key association.
|
||||
* READ-ONLY: Flag indicating whether the identifier/primary key contains at least one foreign key association.
|
||||
*
|
||||
* This flag is necessary because some code blocks require special treatment of this cases.
|
||||
*
|
||||
@ -631,7 +631,7 @@ class ClassMetadataInfo implements ClassMetadata
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the ReflectionPropertys of the mapped class.
|
||||
* Gets the ReflectionProperties of the mapped class.
|
||||
*
|
||||
* @return array An array of ReflectionProperty instances.
|
||||
*/
|
||||
@ -938,7 +938,7 @@ class ClassMetadataInfo implements ClassMetadata
|
||||
*
|
||||
* @throws MappingException
|
||||
*/
|
||||
public function validateAssocations()
|
||||
public function validateAssociations()
|
||||
{
|
||||
foreach ($this->associationMappings as $mapping) {
|
||||
if ( ! ClassLoader::classExists($mapping['targetEntity']) ) {
|
||||
@ -1437,7 +1437,7 @@ class ClassMetadataInfo implements ClassMetadata
|
||||
));
|
||||
}
|
||||
|
||||
$uniqueContraintColumns = array();
|
||||
$uniqueConstraintColumns = array();
|
||||
foreach ($mapping['joinColumns'] as &$joinColumn) {
|
||||
if ($mapping['type'] === self::ONE_TO_ONE && ! $this->isInheritanceTypeSingleTable()) {
|
||||
if (count($mapping['joinColumns']) == 1) {
|
||||
@ -1445,7 +1445,7 @@ class ClassMetadataInfo implements ClassMetadata
|
||||
$joinColumn['unique'] = true;
|
||||
}
|
||||
} else {
|
||||
$uniqueContraintColumns[] = $joinColumn['name'];
|
||||
$uniqueConstraintColumns[] = $joinColumn['name'];
|
||||
}
|
||||
}
|
||||
|
||||
@ -1472,12 +1472,12 @@ class ClassMetadataInfo implements ClassMetadata
|
||||
? $joinColumn['fieldName'] : $joinColumn['name'];
|
||||
}
|
||||
|
||||
if ($uniqueContraintColumns) {
|
||||
if ($uniqueConstraintColumns) {
|
||||
if ( ! $this->table) {
|
||||
throw new RuntimeException("ClassMetadataInfo::setTable() has to be called before defining a one to one relationship.");
|
||||
}
|
||||
$this->table['uniqueConstraints'][$mapping['fieldName']."_uniq"] = array(
|
||||
'columns' => $uniqueContraintColumns
|
||||
'columns' => $uniqueConstraintColumns
|
||||
);
|
||||
}
|
||||
|
||||
@ -1488,7 +1488,7 @@ class ClassMetadataInfo implements ClassMetadata
|
||||
$mapping['isCascadeRemove'] = $mapping['orphanRemoval'] ? true : $mapping['isCascadeRemove'];
|
||||
|
||||
if (isset($mapping['id']) && $mapping['id'] === true && !$mapping['isOwningSide']) {
|
||||
throw MappingException::illegalInverseIdentifierAssocation($this->name, $mapping['fieldName']);
|
||||
throw MappingException::illegalInverseIdentifierAssociation($this->name, $mapping['fieldName']);
|
||||
}
|
||||
|
||||
return $mapping;
|
||||
@ -2051,7 +2051,7 @@ class ClassMetadataInfo implements ClassMetadata
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if this entity is the root in any entity-inheritance-hierachy.
|
||||
* Checks if this entity is the root in any entity-inheritance-hierarchy.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
@ -2427,7 +2427,7 @@ class ClassMetadataInfo implements ClassMetadata
|
||||
* @deprecated Deprecated since version 2.4 in favor of \Doctrine\ORM\Event\ListenersInvoker
|
||||
*
|
||||
* @param string $lifecycleEvent The lifecycle event.
|
||||
* @param object $entity The Entity on which the event occured.
|
||||
* @param object $entity The Entity on which the event occurred.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
@ -21,7 +21,7 @@
|
||||
namespace Doctrine\ORM\Mapping;
|
||||
|
||||
/**
|
||||
* The default DefaultEntityListene
|
||||
* The default DefaultEntityListener
|
||||
*
|
||||
* @since 2.4
|
||||
* @author Fabio B. Silva <fabio.bat.silva@gmail.com>
|
||||
|
@ -247,7 +247,7 @@ class AnnotationDriver extends AbstractAnnotationDriver
|
||||
$mapping = array();
|
||||
$mapping['fieldName'] = $property->getName();
|
||||
|
||||
// Check for JoinColummn/JoinColumns annotations
|
||||
// Check for JoinColumn/JoinColumns annotations
|
||||
$joinColumns = array();
|
||||
|
||||
if ($joinColumnAnnot = $this->reader->getPropertyAnnotation($property, 'Doctrine\ORM\Mapping\JoinColumn')) {
|
||||
@ -375,7 +375,7 @@ class AnnotationDriver extends AbstractAnnotationDriver
|
||||
$override = array();
|
||||
$fieldName = $associationOverride->name;
|
||||
|
||||
// Check for JoinColummn/JoinColumns annotations
|
||||
// Check for JoinColumn/JoinColumns annotations
|
||||
if ($associationOverride->joinColumns) {
|
||||
$joinColumns = array();
|
||||
foreach ($associationOverride->joinColumns as $joinColumn) {
|
||||
|
@ -84,7 +84,7 @@ class DatabaseDriver implements MappingDriver
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets tables manually instead of relying on the reverse engeneering capabilities of SchemaManager.
|
||||
* Sets tables manually instead of relying on the reverse engineering capabilities of SchemaManager.
|
||||
*
|
||||
* @param array $entityTables
|
||||
* @param array $manyToManyTables
|
||||
@ -252,7 +252,7 @@ class DatabaseDriver implements MappingDriver
|
||||
|
||||
if (!$otherFk) {
|
||||
// the definition of this many to many table does not contain
|
||||
// enough foreign key information to continue reverse engeneering.
|
||||
// enough foreign key information to continue reverse engineering.
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -319,7 +319,7 @@ class DatabaseDriver implements MappingDriver
|
||||
);
|
||||
}
|
||||
|
||||
//Here we need to check if $cols are the same as $primaryKeyColums
|
||||
//Here we need to check if $cols are the same as $primaryKeyColumns
|
||||
if (!array_diff($cols,$primaryKeyColumns)) {
|
||||
$metadata->mapOneToOne($associationMapping);
|
||||
} else {
|
||||
|
@ -224,7 +224,7 @@ class XmlDriver extends FileDriver
|
||||
$metadata->table['options'] = $this->_parseOptions($xmlRoot->options->children());
|
||||
}
|
||||
|
||||
// The mapping assignement is done in 2 times as a bug might occurs on some php/xml lib versions
|
||||
// The mapping assignment is done in 2 times as a bug might occurs on some php/xml lib versions
|
||||
// The internal SimpleXmlIterator get resetted, to this generate a duplicate field exception
|
||||
$mappings = array();
|
||||
// Evaluate <field ...> mappings
|
||||
|
@ -529,7 +529,7 @@ class MappingException extends \Doctrine\ORM\ORMException
|
||||
*/
|
||||
public static function cannotVersionIdField($className, $fieldName)
|
||||
{
|
||||
return new self("Setting Id field '$fieldName' as versionale in entity class '$className' is not supported.");
|
||||
return new self("Setting Id field '$fieldName' as versionable in entity class '$className' is not supported.");
|
||||
}
|
||||
|
||||
/**
|
||||
@ -561,7 +561,7 @@ class MappingException extends \Doctrine\ORM\ORMException
|
||||
*
|
||||
* @return MappingException
|
||||
*/
|
||||
public static function illegalToManyAssocationOnMappedSuperclass($className, $field)
|
||||
public static function illegalToManyAssociationOnMappedSuperclass($className, $field)
|
||||
{
|
||||
return new self("It is illegal to put an inverse side one-to-many or many-to-many association on mapped superclass '".$className."#".$field."'.");
|
||||
}
|
||||
@ -632,7 +632,7 @@ class MappingException extends \Doctrine\ORM\ORMException
|
||||
*
|
||||
* @return MappingException
|
||||
*/
|
||||
public static function illegalInverseIdentifierAssocation($className, $field)
|
||||
public static function illegalInverseIdentifierAssociation($className, $field)
|
||||
{
|
||||
return new self("An inverse association is not allowed to be identifier in '$className#$field'.");
|
||||
}
|
||||
@ -643,7 +643,7 @@ class MappingException extends \Doctrine\ORM\ORMException
|
||||
*
|
||||
* @return MappingException
|
||||
*/
|
||||
public static function illegalToManyIdentifierAssoaction($className, $field)
|
||||
public static function illegalToManyIdentifierAssociation($className, $field)
|
||||
{
|
||||
return new self("Many-to-many or one-to-many associations are not allowed to be identifier in '$className#$field'.");
|
||||
}
|
||||
@ -668,8 +668,8 @@ class MappingException extends \Doctrine\ORM\ORMException
|
||||
{
|
||||
return new self(
|
||||
"Entity '" . $className . "' has to be part of the discriminator map of '" . $rootClassName . "' " .
|
||||
"to be properly mapped in the inheritance hierachy. Alternatively you can make '".$className."' an abstract class " .
|
||||
"to avoid this exception from occuring."
|
||||
"to be properly mapped in the inheritance hierarchy. Alternatively you can make '".$className."' an abstract class " .
|
||||
"to avoid this exception from occurring."
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -176,7 +176,7 @@ class ORMInvalidArgumentException extends \InvalidArgumentException
|
||||
public static function invalidCompositeIdentifier()
|
||||
{
|
||||
return new self("Binding an entity with a composite primary key to a query is not supported. " .
|
||||
"You should split the parameter into the explicit fields and bind them seperately.");
|
||||
"You should split the parameter into the explicit fields and bind them separately.");
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -71,7 +71,7 @@ class OptimisticLockException extends ORMException
|
||||
*
|
||||
* @return OptimisticLockException
|
||||
*/
|
||||
public static function lockFailedVersionMissmatch($entity, $expectedLockVersion, $actualLockVersion)
|
||||
public static function lockFailedVersionMismatch($entity, $expectedLockVersion, $actualLockVersion)
|
||||
{
|
||||
return new self("The optimistic lock failed, version " . $expectedLockVersion . " was expected, but is actually ".$actualLockVersion, $entity);
|
||||
}
|
||||
|
@ -843,7 +843,7 @@ final class PersistentCollection implements Collection, Selectable
|
||||
}
|
||||
|
||||
if ($this->association['type'] !== ClassMetadata::ONE_TO_MANY) {
|
||||
throw new \RuntimeException("Matching Criteria on PersistentCollection only works on OneToMany assocations at the moment.");
|
||||
throw new \RuntimeException("Matching Criteria on PersistentCollection only works on OneToMany associations at the moment.");
|
||||
}
|
||||
|
||||
// If there are NEW objects we have to check if any of them matches the criteria
|
||||
|
@ -37,7 +37,7 @@ use Doctrine\Common\Collections\Criteria;
|
||||
use Doctrine\Common\Collections\Expr\Comparison;
|
||||
|
||||
/**
|
||||
* A BasicEntityPersiter maps an entity to a single table in a relational database.
|
||||
* A BasicEntityPersister maps an entity to a single table in a relational database.
|
||||
*
|
||||
* A persister is always responsible for a single entity type.
|
||||
*
|
||||
@ -177,7 +177,7 @@ class BasicEntityPersister
|
||||
protected $selectColumnListSql;
|
||||
|
||||
/**
|
||||
* The JOIN SQL fragement used to eagerly load all many-to-one and one-to-one
|
||||
* The JOIN SQL fragment used to eagerly load all many-to-one and one-to-one
|
||||
* associations configured as FETCH_EAGER, as well as all inverse one-to-one associations.
|
||||
*
|
||||
* @var string
|
||||
@ -499,7 +499,7 @@ class BasicEntityPersister
|
||||
}
|
||||
|
||||
// @Todo this only covers scenarios with no inheritance or of the same level. Is there something
|
||||
// like self-referential relationship between different levels of an inheritance hierachy? I hope not!
|
||||
// like self-referential relationship between different levels of an inheritance hierarchy? I hope not!
|
||||
$selfReferential = ($mapping['targetEntity'] == $mapping['sourceEntity']);
|
||||
$class = $this->class;
|
||||
$association = $mapping;
|
||||
|
@ -302,31 +302,31 @@ class JoinedSubclassPersister extends AbstractEntityInheritancePersister
|
||||
|
||||
// INNER JOIN parent tables
|
||||
foreach ($this->class->parentClasses as $parentClassName) {
|
||||
$contitions = array();
|
||||
$conditions = array();
|
||||
$parentClass = $this->em->getClassMetadata($parentClassName);
|
||||
$tableAlias = $this->getSQLTableAlias($parentClassName);
|
||||
$joinSql .= ' INNER JOIN ' . $this->quoteStrategy->getTableName($parentClass, $this->platform) . ' ' . $tableAlias . ' ON ';
|
||||
|
||||
|
||||
foreach ($identifierColumn as $idColumn) {
|
||||
$contitions[] = $baseTableAlias . '.' . $idColumn . ' = ' . $tableAlias . '.' . $idColumn;
|
||||
$conditions[] = $baseTableAlias . '.' . $idColumn . ' = ' . $tableAlias . '.' . $idColumn;
|
||||
}
|
||||
|
||||
$joinSql .= implode(' AND ', $contitions);
|
||||
$joinSql .= implode(' AND ', $conditions);
|
||||
}
|
||||
|
||||
// OUTER JOIN sub tables
|
||||
foreach ($this->class->subClasses as $subClassName) {
|
||||
$contitions = array();
|
||||
$conditions = array();
|
||||
$subClass = $this->em->getClassMetadata($subClassName);
|
||||
$tableAlias = $this->getSQLTableAlias($subClassName);
|
||||
$joinSql .= ' LEFT JOIN ' . $this->quoteStrategy->getTableName($subClass, $this->platform) . ' ' . $tableAlias . ' ON ';
|
||||
|
||||
foreach ($identifierColumn as $idColumn) {
|
||||
$contitions[] = $baseTableAlias . '.' . $idColumn . ' = ' . $tableAlias . '.' . $idColumn;
|
||||
$conditions[] = $baseTableAlias . '.' . $idColumn . ' = ' . $tableAlias . '.' . $idColumn;
|
||||
}
|
||||
|
||||
$joinSql .= implode(' AND ', $contitions);
|
||||
$joinSql .= implode(' AND ', $conditions);
|
||||
}
|
||||
|
||||
if ($assoc != null && $assoc['type'] == ClassMetadata::MANY_TO_MANY) {
|
||||
|
@ -178,7 +178,7 @@ class SingleTablePersister extends AbstractEntityInheritancePersister
|
||||
{
|
||||
// Ensure that the filters are applied to the root entity of the inheritance tree
|
||||
$targetEntity = $this->em->getClassMetadata($targetEntity->rootEntityName);
|
||||
// we dont care about the $targetTableAlias, in a STI there is only one table.
|
||||
// we don't care about the $targetTableAlias, in a STI there is only one table.
|
||||
|
||||
return parent::generateFilterConditionSQL($targetEntity, $targetTableAlias);
|
||||
}
|
||||
|
@ -327,7 +327,7 @@ final class Query extends AbstractQuery
|
||||
}
|
||||
|
||||
if (count($sqlParams) != count($types)) {
|
||||
throw QueryException::parameterTypeMissmatch();
|
||||
throw QueryException::parameterTypeMismatch();
|
||||
}
|
||||
|
||||
if ($sqlParams) {
|
||||
|
@ -350,8 +350,8 @@ class Expr
|
||||
* When converted to string, it will generated a <left expr> * <right expr>. Example:
|
||||
*
|
||||
* [php]
|
||||
* // u.salary * u.percentAnualSalaryIncrease
|
||||
* $q->expr()->prod('u.salary', 'u.percentAnualSalaryIncrease')
|
||||
* // u.salary * u.percentAnnualSalaryIncrease
|
||||
* $q->expr()->prod('u.salary', 'u.percentAnnualSalaryIncrease')
|
||||
*
|
||||
* @param mixed $x Left expression.
|
||||
* @param mixed $y Right expression.
|
||||
|
@ -23,7 +23,7 @@ use Doctrine\DBAL\Connection;
|
||||
use Doctrine\DBAL\Types\Type;
|
||||
|
||||
/**
|
||||
* Provides an enclosed support for parameter infering.
|
||||
* Provides an enclosed support for parameter inferring.
|
||||
*
|
||||
* @link www.doctrine-project.org
|
||||
* @since 2.0
|
||||
|
@ -305,7 +305,7 @@ class Parser
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @throws QueryException If the tokens dont match.
|
||||
* @throws QueryException If the tokens don't match.
|
||||
*/
|
||||
public function match($token)
|
||||
{
|
||||
@ -644,7 +644,7 @@ class Parser
|
||||
}
|
||||
|
||||
if ($class->getConstructor() === null) {
|
||||
$this->semanticalError(sprintf('Class "%s" has not a valid contructor.', $className), $token);
|
||||
$this->semanticalError(sprintf('Class "%s" has not a valid constructor.', $className), $token);
|
||||
}
|
||||
|
||||
if ($class->getConstructor()->getNumberOfRequiredParameters() > count($args)) {
|
||||
@ -2373,7 +2373,7 @@ class Parser
|
||||
return $condPrimary;
|
||||
}
|
||||
|
||||
// Peek beyond the matching closing paranthesis ')'
|
||||
// Peek beyond the matching closing parenthesis ')'
|
||||
$peek = $this->peekBeyondClosingParenthesis();
|
||||
|
||||
if (in_array($peek['value'], array("=", "<", "<=", "<>", ">", ">=", "!=")) ||
|
||||
@ -2445,7 +2445,7 @@ class Parser
|
||||
$token = $this->lexer->peek();
|
||||
}
|
||||
|
||||
// We need to go even further in case of IS (differenciate between NULL and EMPTY)
|
||||
// We need to go even further in case of IS (differentiate between NULL and EMPTY)
|
||||
$lookahead = $this->lexer->peek();
|
||||
}
|
||||
|
||||
@ -2495,19 +2495,19 @@ class Parser
|
||||
*/
|
||||
public function EmptyCollectionComparisonExpression()
|
||||
{
|
||||
$emptyColletionCompExpr = new AST\EmptyCollectionComparisonExpression(
|
||||
$emptyCollectionCompExpr = new AST\EmptyCollectionComparisonExpression(
|
||||
$this->CollectionValuedPathExpression()
|
||||
);
|
||||
$this->match(Lexer::T_IS);
|
||||
|
||||
if ($this->lexer->isNextToken(Lexer::T_NOT)) {
|
||||
$this->match(Lexer::T_NOT);
|
||||
$emptyColletionCompExpr->not = true;
|
||||
$emptyCollectionCompExpr->not = true;
|
||||
}
|
||||
|
||||
$this->match(Lexer::T_EMPTY);
|
||||
|
||||
return $emptyColletionCompExpr;
|
||||
return $emptyCollectionCompExpr;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -2800,7 +2800,7 @@ class Parser
|
||||
}
|
||||
|
||||
if ($peek['value'] == '(') {
|
||||
// do NOT directly go to FunctionsReturningString() because it doesnt check for custom functions.
|
||||
// do NOT directly go to FunctionsReturningString() because it doesn't check for custom functions.
|
||||
return $this->FunctionDeclaration();
|
||||
}
|
||||
|
||||
|
@ -123,9 +123,9 @@ class QueryException extends \Doctrine\ORM\ORMException
|
||||
/**
|
||||
* @return QueryException
|
||||
*/
|
||||
public static function parameterTypeMissmatch()
|
||||
public static function parameterTypeMismatch()
|
||||
{
|
||||
return new self("DQL Query parameter and type numbers missmatch, but have to be exactly equal.");
|
||||
return new self("DQL Query parameter and type numbers mismatch, but have to be exactly equal.");
|
||||
}
|
||||
|
||||
/**
|
||||
@ -159,7 +159,7 @@ class QueryException extends \Doctrine\ORM\ORMException
|
||||
{
|
||||
return new self(
|
||||
"Invalid query operation: Not allowed to iterate over fetch join collections ".
|
||||
"in class ".$assoc['sourceEntity']." assocation ".$assoc['fieldName']
|
||||
"in class ".$assoc['sourceEntity']." association ".$assoc['fieldName']
|
||||
);
|
||||
}
|
||||
|
||||
@ -184,7 +184,7 @@ class QueryException extends \Doctrine\ORM\ORMException
|
||||
{
|
||||
return new self(
|
||||
"Unsupported query operation: It is not yet possible to overwrite the join ".
|
||||
"conditions in class ".$assoc['sourceEntityName']." assocation ".$assoc['fieldName'].". ".
|
||||
"conditions in class ".$assoc['sourceEntityName']." association ".$assoc['fieldName'].". ".
|
||||
"Use WITH to append additional join conditions to the association."
|
||||
);
|
||||
}
|
||||
@ -234,7 +234,7 @@ class QueryException extends \Doctrine\ORM\ORMException
|
||||
public static function instanceOfUnrelatedClass($className, $rootClass)
|
||||
{
|
||||
return new self("Cannot check if a child of '" . $rootClass . "' is instanceof '" . $className . "', " .
|
||||
"inheritance hierachy exists between these two classes.");
|
||||
"inheritance hierarchy exists between these two classes.");
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1042,7 +1042,7 @@ class SqlWalker implements TreeWalker
|
||||
|
||||
// Handle WITH clause
|
||||
if (($condExpr = $join->conditionalExpression) !== null) {
|
||||
// Phase 2 AST optimization: Skip processment of ConditionalExpression
|
||||
// Phase 2 AST optimization: Skip processing of ConditionalExpression
|
||||
// if only one ConditionalTerm is defined
|
||||
$sql .= ' AND (' . $this->walkConditionalExpression($condExpr) . ')';
|
||||
}
|
||||
@ -1691,7 +1691,7 @@ class SqlWalker implements TreeWalker
|
||||
*/
|
||||
public function walkConditionalExpression($condExpr)
|
||||
{
|
||||
// Phase 2 AST optimization: Skip processment of ConditionalExpression
|
||||
// Phase 2 AST optimization: Skip processing of ConditionalExpression
|
||||
// if only one ConditionalTerm is defined
|
||||
if ( ! ($condExpr instanceof AST\ConditionalExpression)) {
|
||||
return $this->walkConditionalTerm($condExpr);
|
||||
@ -1705,7 +1705,7 @@ class SqlWalker implements TreeWalker
|
||||
*/
|
||||
public function walkConditionalTerm($condTerm)
|
||||
{
|
||||
// Phase 2 AST optimization: Skip processment of ConditionalTerm
|
||||
// Phase 2 AST optimization: Skip processing of ConditionalTerm
|
||||
// if only one ConditionalFactor is defined
|
||||
if ( ! ($condTerm instanceof AST\ConditionalTerm)) {
|
||||
return $this->walkConditionalFactor($condTerm);
|
||||
@ -1719,7 +1719,7 @@ class SqlWalker implements TreeWalker
|
||||
*/
|
||||
public function walkConditionalFactor($factor)
|
||||
{
|
||||
// Phase 2 AST optimization: Skip processment of ConditionalFactor
|
||||
// Phase 2 AST optimization: Skip processing of ConditionalFactor
|
||||
// if only one ConditionalPrimary is defined
|
||||
return ( ! ($factor instanceof AST\ConditionalFactor))
|
||||
? $this->walkConditionalPrimary($factor)
|
||||
@ -2114,7 +2114,7 @@ class SqlWalker implements TreeWalker
|
||||
: $term;
|
||||
}
|
||||
|
||||
// Phase 2 AST optimization: Skip processment of ArithmeticTerm
|
||||
// Phase 2 AST optimization: Skip processing of ArithmeticTerm
|
||||
// if only one ArithmeticFactor is defined
|
||||
if ( ! ($term instanceof AST\ArithmeticTerm)) {
|
||||
return $this->walkArithmeticFactor($term);
|
||||
@ -2132,7 +2132,7 @@ class SqlWalker implements TreeWalker
|
||||
return $factor;
|
||||
}
|
||||
|
||||
// Phase 2 AST optimization: Skip processment of ArithmeticFactor
|
||||
// Phase 2 AST optimization: Skip processing of ArithmeticFactor
|
||||
// if only one ArithmeticPrimary is defined
|
||||
if ( ! ($factor instanceof AST\ArithmeticFactor)) {
|
||||
return $this->walkArithmeticPrimary($factor);
|
||||
|
@ -90,7 +90,7 @@ abstract class TreeWalkerAdapter implements TreeWalker
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the Query Instance reponsible for the current walkers execution.
|
||||
* Retrieves the Query Instance responsible for the current walkers execution.
|
||||
*
|
||||
* @return \Doctrine\ORM\AbstractQuery
|
||||
*/
|
||||
|
@ -86,10 +86,10 @@ class ConvertMappingCommand extends Command
|
||||
Convert mapping information between supported formats.
|
||||
|
||||
This is an execute <info>one-time</info> command. It should not be necessary for
|
||||
you to call this method multiple times, escpecially when using the <comment>--from-database</comment>
|
||||
you to call this method multiple times, especially when using the <comment>--from-database</comment>
|
||||
flag.
|
||||
|
||||
Converting an existing databsae schema into mapping files only solves about 70-80%
|
||||
Converting an existing database schema into mapping files only solves about 70-80%
|
||||
of the necessary mapping information. Additionally the detection from an existing
|
||||
database cannot detect inverse associations, inheritance types,
|
||||
entities with foreign keys as primary keys and many of the
|
||||
|
@ -91,7 +91,7 @@ to error and we suggest you use code repositories such as GIT or SVN to make
|
||||
backups of your code.
|
||||
|
||||
It makes sense to generate the entity code if you are using entities as Data
|
||||
Access Objects only and dont put much additional logic on them. If you are
|
||||
Access Objects only and don't put much additional logic on them. If you are
|
||||
however putting much more logic on the entities you should refrain from using
|
||||
the entity-generator and code your entities manually.
|
||||
|
||||
|
@ -500,7 +500,7 @@ class SchemaTool
|
||||
* Gets the class metadata that is responsible for the definition of the referenced column name.
|
||||
*
|
||||
* Previously this was a simple task, but with DDC-117 this problem is actually recursive. If its
|
||||
* not a simple field, go through all identifier field names that are associations recursivly and
|
||||
* not a simple field, go through all identifier field names that are associations recursively and
|
||||
* find that referenced column name.
|
||||
*
|
||||
* TODO: Is there any way to make this code more pleasing?
|
||||
@ -643,7 +643,7 @@ class SchemaTool
|
||||
/**
|
||||
* Drops the database schema for the given classes.
|
||||
*
|
||||
* In any way when an exception is thrown it is supressed since drop was
|
||||
* In any way when an exception is thrown it is suppressed since drop was
|
||||
* issued for all classes of the schema and some probably just don't exist.
|
||||
*
|
||||
* @param array $classes
|
||||
|
@ -23,7 +23,7 @@ class ToolEvents
|
||||
{
|
||||
/**
|
||||
* The postGenerateSchemaTable event occurs in SchemaTool#getSchemaFromMetadata()
|
||||
* whenever an entity class is transformed into its table representation. It recieves
|
||||
* whenever an entity class is transformed into its table representation. It receives
|
||||
* the current non-complete Schema instance, the Entity Metadata Class instance and
|
||||
* the Schema Table instance of this entity.
|
||||
*
|
||||
|
@ -1822,7 +1822,7 @@ class UnitOfWork implements PropertyChangedListener
|
||||
|
||||
// Throw exception if versions dont match.
|
||||
if ($managedCopyVersion != $entityVersion) {
|
||||
throw OptimisticLockException::lockFailedVersionMissmatch($entity, $entityVersion, $managedCopyVersion);
|
||||
throw OptimisticLockException::lockFailedVersionMismatch($entity, $entityVersion, $managedCopyVersion);
|
||||
}
|
||||
}
|
||||
|
||||
@ -2281,7 +2281,7 @@ class UnitOfWork implements PropertyChangedListener
|
||||
$entityVersion = $class->reflFields[$class->versionField]->getValue($entity);
|
||||
|
||||
if ($entityVersion != $lockVersion) {
|
||||
throw OptimisticLockException::lockFailedVersionMissmatch($entity, $lockVersion, $entityVersion);
|
||||
throw OptimisticLockException::lockFailedVersionMismatch($entity, $lockVersion, $entityVersion);
|
||||
}
|
||||
|
||||
break;
|
||||
|
@ -2,7 +2,7 @@
|
||||
<!--
|
||||
Use this configuration file as a template to run the tests against any dbms.
|
||||
Procedure:
|
||||
1) Save a copy of this file with a name of your chosing. It doesn't matter
|
||||
1) Save a copy of this file with a name of your choosing. It doesn't matter
|
||||
where you place it as long as you know where it is.
|
||||
i.e. "mysqlconf.xml" (It needs the ending .xml).
|
||||
2) Edit the file and fill in your settings (database name, type, username, etc.)
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
# This script is a small convenience wrapper for running the doctrine testsuite against a large bunch of databases.
|
||||
# Just create the phpunit.xmls as described in the array below and configure the specific files <php /> section
|
||||
# to connect to that database. Just omit a file if you dont have that database and the tests will be skipped.
|
||||
# to connect to that database. Just omit a file if you don't have that database and the tests will be skipped.
|
||||
|
||||
configs[1]="mysql.phpunit.xml"
|
||||
configs[2]='postgres.phpunit.xml'
|
||||
|
@ -4,8 +4,8 @@ namespace Doctrine\Tests\Models\StockExchange;
|
||||
use Doctrine\Common\Collections\ArrayCollection;
|
||||
|
||||
/**
|
||||
* Bonds have many stocks. This uses a many to many assocation and fails to model how many of a
|
||||
* particular stock a bond has. But i Need a many-to-many assocation, so please bear with my modelling skills ;)
|
||||
* Bonds have many stocks. This uses a many to many association and fails to model how many of a
|
||||
* particular stock a bond has. But i Need a many-to-many association, so please bear with my modelling skills ;)
|
||||
*
|
||||
* @Entity
|
||||
* @Table(name="exchange_bonds")
|
||||
|
@ -76,7 +76,7 @@ class AdvancedDqlQueryTest extends \Doctrine\Tests\OrmFunctionalTestCase
|
||||
$this->assertEquals(1, $result[3]['friends']);
|
||||
}
|
||||
|
||||
public function testIsNullAssocation()
|
||||
public function testIsNullAssociation()
|
||||
{
|
||||
$dql = 'SELECT p FROM Doctrine\Tests\Models\Company\CompanyPerson p '.
|
||||
'WHERE p.spouse IS NULL';
|
||||
|
@ -1274,7 +1274,7 @@ class BasicFunctionalTest extends \Doctrine\Tests\OrmFunctionalTestCase
|
||||
/**
|
||||
* @group DDC-1585
|
||||
*/
|
||||
public function testWrongAssocationInstance()
|
||||
public function testWrongAssociationInstance()
|
||||
{
|
||||
$user = new CmsUser;
|
||||
$user->name = 'Dominik';
|
||||
|
@ -417,7 +417,7 @@ class ClassTableInheritanceTest extends \Doctrine\Tests\OrmFunctionalTestCase
|
||||
$ref = $this->_em->getReference('Doctrine\Tests\Models\Company\CompanyPerson', $manager->getId());
|
||||
$this->assertNotInstanceOf('Doctrine\ORM\Proxy\Proxy', $ref, "Cannot Request a proxy from a class that has subclasses.");
|
||||
$this->assertInstanceOf('Doctrine\Tests\Models\Company\CompanyPerson', $ref);
|
||||
$this->assertInstanceOf('Doctrine\Tests\Models\Company\CompanyEmployee', $ref, "Direct fetch of the reference has to load the child class Emplyoee directly.");
|
||||
$this->assertInstanceOf('Doctrine\Tests\Models\Company\CompanyEmployee', $ref, "Direct fetch of the reference has to load the child class Employee directly.");
|
||||
$this->_em->clear();
|
||||
|
||||
$ref = $this->_em->getReference('Doctrine\Tests\Models\Company\CompanyManager', $manager->getId());
|
||||
|
@ -132,7 +132,7 @@ class CompositePrimaryKeyTest extends \Doctrine\Tests\OrmFunctionalTestCase
|
||||
$this->assertEquals(1, count($tours));
|
||||
}
|
||||
|
||||
public function testSpecifiyUnknownIdentifierPrimaryKeyFails()
|
||||
public function testSpecifyUnknownIdentifierPrimaryKeyFails()
|
||||
{
|
||||
$this->setExpectedException('Doctrine\ORM\ORMException', 'The identifier long is missing for a query of Doctrine\Tests\Models\Navigation\NavPointOfInterest');
|
||||
$poi = $this->_em->find('Doctrine\Tests\Models\Navigation\NavPointOfInterest', array('key1' => 100));
|
||||
|
@ -58,7 +58,7 @@ class DefaultValuesTest extends \Doctrine\Tests\OrmFunctionalTestCase
|
||||
/**
|
||||
* @group DDC-1386
|
||||
*/
|
||||
public function testGetPartialReferenceWithDefaultValueNotEvalutedInFlush()
|
||||
public function testGetPartialReferenceWithDefaultValueNotEvaluatedInFlush()
|
||||
{
|
||||
$user = new DefaultValueUser;
|
||||
$user->name = 'romanb';
|
||||
|
@ -618,7 +618,7 @@ class EntityRepositoryTest extends \Doctrine\Tests\OrmFunctionalTestCase
|
||||
* @expectedException Doctrine\ORM\ORMException
|
||||
* @expectedExceptionMessage You cannot search for the association field 'Doctrine\Tests\Models\CMS\CmsUser#address', because it is the inverse side of an association.
|
||||
*/
|
||||
public function testInvalidOrderByAsssociation()
|
||||
public function testInvalidOrderByAssociation()
|
||||
{
|
||||
$this->_em->getRepository('Doctrine\Tests\Models\CMS\CmsUser')
|
||||
->findBy(array('status' => 'test'), array('address' => 'ASC'));
|
||||
@ -638,7 +638,7 @@ class EntityRepositoryTest extends \Doctrine\Tests\OrmFunctionalTestCase
|
||||
/**
|
||||
* @group DDC-1713
|
||||
*/
|
||||
public function testFindByAssocationArray()
|
||||
public function testFindByAssociationArray()
|
||||
{
|
||||
$repo = $this->_em->getRepository('Doctrine\Tests\Models\CMS\CmsArticle');
|
||||
$data = $repo->findBy(array('user' => array(1, 2, 3)));
|
||||
|
@ -91,7 +91,7 @@ class ExtraLazyCollectionTest extends \Doctrine\Tests\OrmFunctionalTestCase
|
||||
|
||||
$this->assertTrue($user->groups->isInitialized());
|
||||
$this->assertEquals(3, count($user->groups));
|
||||
$this->assertEquals($queryCount + 1, $this->getCurrentQueryCount(), "Should only execute one query to initialize colleciton, no extra query for count() more.");
|
||||
$this->assertEquals($queryCount + 1, $this->getCurrentQueryCount(), "Should only execute one query to initialize collection, no extra query for count() more.");
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -51,8 +51,8 @@ class IndexByAssociationTest extends \Doctrine\Tests\OrmFunctionalTestCase
|
||||
$market = $this->_em->find('Doctrine\Tests\Models\StockExchange\Market', $this->market->getId());
|
||||
|
||||
$this->assertEquals(2, count($market->stocks));
|
||||
$this->assertTrue(isset($market->stocks['AAPL']), "AAPL symbol has to be key in indexed assocation.");
|
||||
$this->assertTrue(isset($market->stocks['GOOG']), "GOOG symbol has to be key in indexed assocation.");
|
||||
$this->assertTrue(isset($market->stocks['AAPL']), "AAPL symbol has to be key in indexed association.");
|
||||
$this->assertTrue(isset($market->stocks['GOOG']), "GOOG symbol has to be key in indexed association.");
|
||||
$this->assertEquals("AAPL", $market->stocks['AAPL']->getSymbol());
|
||||
$this->assertEquals("GOOG", $market->stocks['GOOG']->getSymbol());
|
||||
}
|
||||
@ -63,8 +63,8 @@ class IndexByAssociationTest extends \Doctrine\Tests\OrmFunctionalTestCase
|
||||
$market = $this->_em->createQuery($dql)->setParameter(1, $this->market->getId())->getSingleResult();
|
||||
|
||||
$this->assertEquals(2, count($market->stocks));
|
||||
$this->assertTrue(isset($market->stocks['AAPL']), "AAPL symbol has to be key in indexed assocation.");
|
||||
$this->assertTrue(isset($market->stocks['GOOG']), "GOOG symbol has to be key in indexed assocation.");
|
||||
$this->assertTrue(isset($market->stocks['AAPL']), "AAPL symbol has to be key in indexed association.");
|
||||
$this->assertTrue(isset($market->stocks['GOOG']), "GOOG symbol has to be key in indexed association.");
|
||||
$this->assertEquals("AAPL", $market->stocks['AAPL']->getSymbol());
|
||||
$this->assertEquals("GOOG", $market->stocks['GOOG']->getSymbol());
|
||||
}
|
||||
@ -74,8 +74,8 @@ class IndexByAssociationTest extends \Doctrine\Tests\OrmFunctionalTestCase
|
||||
$bond = $this->_em->find('Doctrine\Tests\Models\StockExchange\Bond', $this->bond->getId());
|
||||
|
||||
$this->assertEquals(2, count($bond->stocks));
|
||||
$this->assertTrue(isset($bond->stocks['AAPL']), "AAPL symbol has to be key in indexed assocation.");
|
||||
$this->assertTrue(isset($bond->stocks['GOOG']), "GOOG symbol has to be key in indexed assocation.");
|
||||
$this->assertTrue(isset($bond->stocks['AAPL']), "AAPL symbol has to be key in indexed association.");
|
||||
$this->assertTrue(isset($bond->stocks['GOOG']), "GOOG symbol has to be key in indexed association.");
|
||||
$this->assertEquals("AAPL", $bond->stocks['AAPL']->getSymbol());
|
||||
$this->assertEquals("GOOG", $bond->stocks['GOOG']->getSymbol());
|
||||
}
|
||||
@ -86,8 +86,8 @@ class IndexByAssociationTest extends \Doctrine\Tests\OrmFunctionalTestCase
|
||||
$bond = $this->_em->createQuery($dql)->setParameter(1, $this->bond->getId())->getSingleResult();
|
||||
|
||||
$this->assertEquals(2, count($bond->stocks));
|
||||
$this->assertTrue(isset($bond->stocks['AAPL']), "AAPL symbol has to be key in indexed assocation.");
|
||||
$this->assertTrue(isset($bond->stocks['GOOG']), "GOOG symbol has to be key in indexed assocation.");
|
||||
$this->assertTrue(isset($bond->stocks['AAPL']), "AAPL symbol has to be key in indexed association.");
|
||||
$this->assertTrue(isset($bond->stocks['GOOG']), "GOOG symbol has to be key in indexed association.");
|
||||
$this->assertEquals("AAPL", $bond->stocks['AAPL']->getSymbol());
|
||||
$this->assertEquals("GOOG", $bond->stocks['GOOG']->getSymbol());
|
||||
}
|
||||
@ -98,8 +98,8 @@ class IndexByAssociationTest extends \Doctrine\Tests\OrmFunctionalTestCase
|
||||
$bond = $this->_em->createQuery($dql)->setParameter(1, $this->bond->getId())->getSingleResult();
|
||||
|
||||
$this->assertEquals(2, count($bond->stocks));
|
||||
$this->assertFalse(isset($bond->stocks['AAPL']), "AAPL symbol not exists in re-indexed assocation.");
|
||||
$this->assertFalse(isset($bond->stocks['GOOG']), "GOOG symbol not exists in re-indexed assocation.");
|
||||
$this->assertFalse(isset($bond->stocks['AAPL']), "AAPL symbol not exists in re-indexed association.");
|
||||
$this->assertFalse(isset($bond->stocks['GOOG']), "GOOG symbol not exists in re-indexed association.");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -38,7 +38,7 @@ class LockTest extends \Doctrine\Tests\OrmFunctionalTestCase {
|
||||
* @group DDC-178
|
||||
* @group locking
|
||||
*/
|
||||
public function testLockVersionedEntity_MissmatchThrowsException() {
|
||||
public function testLockVersionedEntity_MismatchThrowsException() {
|
||||
$article = new CmsArticle();
|
||||
$article->text = "my article";
|
||||
$article->topic = "Hello";
|
||||
|
@ -11,7 +11,7 @@ require_once __DIR__ . '/../../TestInit.php';
|
||||
/**
|
||||
* Tests a self referential many-to-many association mapping (from a model to the same model, without inheritance).
|
||||
* For simplicity the relation duplicates entries in the association table
|
||||
* to remain simmetrical.
|
||||
* to remain symmetrical.
|
||||
*/
|
||||
class ManyToManySelfReferentialAssociationTest extends AbstractManyToManyAssociationTestCase
|
||||
{
|
||||
|
@ -543,7 +543,7 @@ class NewOperatorTest extends \Doctrine\Tests\OrmFunctionalTestCase
|
||||
|
||||
/**
|
||||
* @expectedException Doctrine\ORM\Query\QueryException
|
||||
* @expectedExceptionMessage [Semantical Error] line 0, col 11 near '\stdClass(u.name)': Error: Class "\stdClass" has not a valid contructor.
|
||||
* @expectedExceptionMessage [Semantical Error] line 0, col 11 near '\stdClass(u.name)': Error: Class "\stdClass" has not a valid constructor.
|
||||
*/
|
||||
public function testInvalidClassConstructorException()
|
||||
{
|
||||
|
@ -75,7 +75,7 @@ class OneToManyUnidirectionalAssociationTest extends \Doctrine\Tests\OrmFunction
|
||||
|
||||
$exceptionThrown = false;
|
||||
try {
|
||||
// exception depending on the underyling Database Driver
|
||||
// exception depending on the underlying Database Driver
|
||||
$this->_em->flush();
|
||||
} catch(\Exception $e) {
|
||||
$exceptionThrown = true;
|
||||
|
@ -64,7 +64,7 @@ class OneToOneOrphanRemovalTest extends \Doctrine\Tests\OrmFunctionalTestCase
|
||||
$user = new CmsUser;
|
||||
$user->status = 'dev';
|
||||
$user->username = 'beberlei';
|
||||
$user->name = 'Bejamin Eberlei';
|
||||
$user->name = 'Benjamin Eberlei';
|
||||
|
||||
$email = new CmsEmail;
|
||||
$email->email = 'beberlei@domain.com';
|
||||
|
@ -214,7 +214,7 @@ class SingleTableInheritanceTest extends \Doctrine\Tests\OrmFunctionalTestCase
|
||||
$this->assertContainsOnly('Doctrine\Tests\Models\Company\CompanyContract', $contracts);
|
||||
}
|
||||
|
||||
public function testQueryScalarWithDiscrimnatorValue()
|
||||
public function testQueryScalarWithDiscriminatorValue()
|
||||
{
|
||||
$this->loadFullFixture();
|
||||
|
||||
@ -364,7 +364,7 @@ class SingleTableInheritanceTest extends \Doctrine\Tests\OrmFunctionalTestCase
|
||||
$ref = $this->_em->getReference('Doctrine\Tests\Models\Company\CompanyContract', $this->fix->getId());
|
||||
$this->assertNotInstanceOf('Doctrine\ORM\Proxy\Proxy', $ref, "Cannot Request a proxy from a class that has subclasses.");
|
||||
$this->assertInstanceOf('Doctrine\Tests\Models\Company\CompanyContract', $ref);
|
||||
$this->assertInstanceOf('Doctrine\Tests\Models\Company\CompanyFixContract', $ref, "Direct fetch of the reference has to load the child class Emplyoee directly.");
|
||||
$this->assertInstanceOf('Doctrine\Tests\Models\Company\CompanyFixContract', $ref, "Direct fetch of the reference has to load the child class Employee directly.");
|
||||
$this->_em->clear();
|
||||
|
||||
$ref = $this->_em->getReference('Doctrine\Tests\Models\Company\CompanyFixContract', $this->fix->getId());
|
||||
@ -374,7 +374,7 @@ class SingleTableInheritanceTest extends \Doctrine\Tests\OrmFunctionalTestCase
|
||||
/**
|
||||
* @group DDC-952
|
||||
*/
|
||||
public function testEagerLoadInheritanceHierachy()
|
||||
public function testEagerLoadInheritanceHierarchy()
|
||||
{
|
||||
$this->loadFullFixture();
|
||||
|
||||
|
@ -85,7 +85,7 @@ class DDC117Test extends \Doctrine\Tests\OrmFunctionalTestCase
|
||||
/**
|
||||
* @group DDC-117
|
||||
*/
|
||||
public function testUpdateAssocationEntity()
|
||||
public function testUpdateAssociationEntity()
|
||||
{
|
||||
$idCriteria = array('source' => $this->article1->id(), 'target' => $this->article2->id());
|
||||
|
||||
@ -211,7 +211,7 @@ class DDC117Test extends \Doctrine\Tests\OrmFunctionalTestCase
|
||||
|
||||
$exceptionThrown = false;
|
||||
try {
|
||||
// exception depending on the underyling Database Driver
|
||||
// exception depending on the underlying Database Driver
|
||||
$this->_em->flush();
|
||||
} catch(\Exception $e) {
|
||||
$exceptionThrown = true;
|
||||
|
@ -29,7 +29,7 @@ class DDC142Test extends \Doctrine\Tests\OrmFunctionalTestCase
|
||||
}
|
||||
}
|
||||
|
||||
public function testCreateRetreaveUpdateDelete()
|
||||
public function testCreateRetrieveUpdateDelete()
|
||||
{
|
||||
|
||||
$user = new User;
|
||||
|
@ -37,7 +37,7 @@ class DDC1526Test extends \Doctrine\Tests\OrmFunctionalTestCase
|
||||
LEFT JOIN m.children c";
|
||||
$menus = $this->_em->createQuery($dql)->getResult();
|
||||
|
||||
// All Children collection now have to be initiailzed
|
||||
// All Children collection now have to be initialized
|
||||
foreach ($menus as $menu) {
|
||||
$this->assertTrue($menu->children->isInitialized());
|
||||
}
|
||||
|
@ -25,7 +25,7 @@ class DDC1719Test extends \Doctrine\Tests\OrmFunctionalTestCase
|
||||
}
|
||||
}
|
||||
|
||||
public function testCreateRetreaveUpdateDelete()
|
||||
public function testCreateRetrieveUpdateDelete()
|
||||
{
|
||||
$e1 = new SimpleEntity('Bar 1');
|
||||
$e2 = new SimpleEntity('Foo 1');
|
||||
@ -39,7 +39,7 @@ class DDC1719Test extends \Doctrine\Tests\OrmFunctionalTestCase
|
||||
$e1Id = $e1->id;
|
||||
$e2Id = $e2->id;
|
||||
|
||||
// Retreave
|
||||
// Retrieve
|
||||
$e1 = $this->_em->find(self::CLASS_NAME, $e1Id);
|
||||
$e2 = $this->_em->find(self::CLASS_NAME, $e2Id);
|
||||
|
||||
|
@ -28,7 +28,7 @@ class DDC1843Test extends \Doctrine\Tests\OrmFunctionalTestCase
|
||||
}
|
||||
}
|
||||
|
||||
public function testCreateRetreaveUpdateDelete()
|
||||
public function testCreateRetrieveUpdateDelete()
|
||||
{
|
||||
|
||||
$e1 = new Group('Parent Bar 1');
|
||||
@ -52,7 +52,7 @@ class DDC1843Test extends \Doctrine\Tests\OrmFunctionalTestCase
|
||||
$e3Id = $e3->id;
|
||||
$e4Id = $e4->id;
|
||||
|
||||
// Retreave
|
||||
// Retrieve
|
||||
$e1 = $this->_em->find('Doctrine\Tests\Models\Quote\Group', $e1Id);
|
||||
$e2 = $this->_em->find('Doctrine\Tests\Models\Quote\Group', $e2Id);
|
||||
$e3 = $this->_em->find('Doctrine\Tests\Models\Quote\Group', $e3Id);
|
||||
@ -121,7 +121,7 @@ class DDC1843Test extends \Doctrine\Tests\OrmFunctionalTestCase
|
||||
$this->assertInstanceOf('Doctrine\Tests\Models\Quote\Group', $e3);
|
||||
$this->assertInstanceOf('Doctrine\Tests\Models\Quote\Group', $e4);
|
||||
|
||||
// Retreave
|
||||
// Retrieve
|
||||
$e1 = $this->_em->find('Doctrine\Tests\Models\Quote\Group', $e1Id);
|
||||
$e2 = $this->_em->find('Doctrine\Tests\Models\Quote\Group', $e2Id);
|
||||
$e3 = $this->_em->find('Doctrine\Tests\Models\Quote\Group', $e3Id);
|
||||
|
@ -44,7 +44,7 @@ class DDC1885Test extends \Doctrine\Tests\OrmFunctionalTestCase
|
||||
|
||||
}
|
||||
|
||||
public function testCreateRetreaveUpdateDelete()
|
||||
public function testCreateRetrieveUpdateDelete()
|
||||
{
|
||||
$user = $this->user;
|
||||
$g1 = $user->getGroups()->get(0);
|
||||
@ -54,7 +54,7 @@ class DDC1885Test extends \Doctrine\Tests\OrmFunctionalTestCase
|
||||
$g1Id = $g1->id;
|
||||
$g2Id = $g2->id;
|
||||
|
||||
// Retreave
|
||||
// Retrieve
|
||||
$user = $this->_em->find('Doctrine\Tests\Models\Quote\User', $u1Id);
|
||||
|
||||
$this->assertInstanceOf('Doctrine\Tests\Models\Quote\User', $user);
|
||||
|
@ -64,7 +64,7 @@ class DDC501Test extends OrmFunctionalTestCase
|
||||
$userClone = $this->_em->merge($userClone);
|
||||
|
||||
// Back in managed world I would expect to have my phonenumbers back but they aren't!
|
||||
// Remember I didn't touch (and propably didn't need) them at all while in detached mode.
|
||||
// Remember I didn't touch (and probably didn't need) them at all while in detached mode.
|
||||
$this->assertEquals(4, count($userClone->getPhonenumbers()), 'Phonenumbers are not available anymore');
|
||||
|
||||
// This works fine as long as cmUser::groups doesn't cascade "merge"
|
||||
|
@ -18,7 +18,7 @@ class DDC599Test extends \Doctrine\Tests\OrmFunctionalTestCase
|
||||
} catch (\Exception $ignored) {}
|
||||
}
|
||||
|
||||
public function testCascadeRemoveOnInheritanceHierachy()
|
||||
public function testCascadeRemoveOnInheritanceHierarchy()
|
||||
{
|
||||
$item = new DDC599Subitem;
|
||||
$item->elem = "foo";
|
||||
|
@ -76,7 +76,7 @@ class DDC618Test extends \Doctrine\Tests\OrmFunctionalTestCase
|
||||
'INNER JOIN A.books B INDEX BY B.title ORDER BY A.name ASC';
|
||||
$result = $this->_em->createQuery($dql)->getResult(\Doctrine\ORM\Query::HYDRATE_OBJECT);
|
||||
|
||||
$this->assertEquals(3, count($result[0]->books)); // Alice, Joe doesnt appear because he has no books.
|
||||
$this->assertEquals(3, count($result[0]->books)); // Alice, Joe doesn't appear because he has no books.
|
||||
$this->assertEquals('Alice', $result[0]->name);
|
||||
$this->assertTrue( isset($result[0]->books["In Wonderland"] ), "Indexing by title should have books by title.");
|
||||
$this->assertTrue( isset($result[0]->books["Reloaded"] ), "Indexing by title should have books by title.");
|
||||
@ -84,7 +84,7 @@ class DDC618Test extends \Doctrine\Tests\OrmFunctionalTestCase
|
||||
|
||||
$result = $this->_em->createQuery($dql)->getResult(\Doctrine\ORM\Query::HYDRATE_ARRAY);
|
||||
|
||||
$this->assertEquals(3, count($result[0]['books'])); // Alice, Joe doesnt appear because he has no books.
|
||||
$this->assertEquals(3, count($result[0]['books'])); // Alice, Joe doesn't appear because he has no books.
|
||||
$this->assertEquals('Alice', $result[0]['name']);
|
||||
$this->assertTrue( isset($result[0]['books']["In Wonderland"] ), "Indexing by title should have books by title.");
|
||||
$this->assertTrue( isset($result[0]['books']["Reloaded"] ), "Indexing by title should have books by title.");
|
||||
@ -121,7 +121,7 @@ class DDC618Test extends \Doctrine\Tests\OrmFunctionalTestCase
|
||||
|
||||
$this->assertArrayHasKey(11, $result); // Alice
|
||||
|
||||
$this->assertEquals(3, count($result[11]->books)); // Alice, Joe doesnt appear because he has no books.
|
||||
$this->assertEquals(3, count($result[11]->books)); // Alice, Joe doesn't appear because he has no books.
|
||||
$this->assertEquals('Alice', $result[11]->name);
|
||||
$this->assertTrue( isset($result[11]->books["In Wonderland"] ), "Indexing by title should have books by title.");
|
||||
$this->assertTrue( isset($result[11]->books["Reloaded"] ), "Indexing by title should have books by title.");
|
||||
|
@ -88,7 +88,7 @@ class DDC758Test extends \Doctrine\Tests\OrmFunctionalTestCase
|
||||
$cmsUser->addGroup($group1);
|
||||
$cmsUser->addGroup($group2);
|
||||
|
||||
// Cascade merge of cmsUser followed by a flush should add in the birectional new many-to-many associations between the user and the groups
|
||||
// Cascade merge of cmsUser followed by a flush should add in the bidirectional new many-to-many associations between the user and the groups
|
||||
$this->_em->merge($cmsUser);
|
||||
$this->_em->flush();
|
||||
|
||||
|
@ -26,7 +26,7 @@ class DDC933Test extends \Doctrine\Tests\OrmFunctionalTestCase
|
||||
$manager = new \Doctrine\Tests\Models\Company\CompanyManager();
|
||||
$manager->setName('beberlei');
|
||||
$manager->setSalary(1234);
|
||||
$manager->setTitle('Vice Precident of This Test');
|
||||
$manager->setTitle('Vice President of This Test');
|
||||
$manager->setDepartment("Foo");
|
||||
|
||||
$this->_em->persist($manager);
|
||||
|
@ -208,7 +208,7 @@ abstract class AbstractMappingDriverTest extends \Doctrine\Tests\OrmTestCase
|
||||
* @depends testIdentifier
|
||||
* @param ClassMetadata $class
|
||||
*/
|
||||
public function testAssocations($class)
|
||||
public function testAssociations($class)
|
||||
{
|
||||
$this->assertEquals(3, count($class->associationMappings));
|
||||
|
||||
@ -216,10 +216,10 @@ abstract class AbstractMappingDriverTest extends \Doctrine\Tests\OrmTestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @depends testAssocations
|
||||
* @depends testAssociations
|
||||
* @param ClassMetadata $class
|
||||
*/
|
||||
public function testOwningOneToOneAssocation($class)
|
||||
public function testOwningOneToOneAssociation($class)
|
||||
{
|
||||
$this->assertTrue(isset($class->associationMappings['address']));
|
||||
$this->assertTrue($class->associationMappings['address']['isOwningSide']);
|
||||
@ -235,7 +235,7 @@ abstract class AbstractMappingDriverTest extends \Doctrine\Tests\OrmTestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @depends testOwningOneToOneAssocation
|
||||
* @depends testOwningOneToOneAssociation
|
||||
* @param ClassMetadata $class
|
||||
*/
|
||||
public function testInverseOneToManyAssociation($class)
|
||||
@ -791,7 +791,7 @@ abstract class AbstractMappingDriverTest extends \Doctrine\Tests\OrmTestCase
|
||||
$factory = $this->createClassMetadataFactory($em);
|
||||
$ultraClass = $factory->getMetadataFor('Doctrine\Tests\Models\Company\CompanyFlexUltraContract');
|
||||
|
||||
//overrited listeners
|
||||
//overridden listeners
|
||||
$this->assertArrayHasKey(Events::postPersist, $ultraClass->entityListeners);
|
||||
$this->assertArrayHasKey(Events::prePersist, $ultraClass->entityListeners);
|
||||
|
||||
|
@ -190,7 +190,7 @@ class AnnotationDriverTest extends AbstractMappingDriverTest
|
||||
/**
|
||||
* @group DDC-1156
|
||||
*/
|
||||
public function testMappedSuperclassInMiddleOfInheritanceHierachy()
|
||||
public function testMappedSuperclassInMiddleOfInheritanceHierarchy()
|
||||
{
|
||||
$annotationDriver = $this->_loadDriver();
|
||||
|
||||
|
@ -56,7 +56,7 @@ class BasicInheritanceMappingTest extends \Doctrine\Tests\OrmTestCase
|
||||
/**
|
||||
* @group DDC-869
|
||||
*/
|
||||
public function testGetMetadataForSubclassWithMappedSuperclassWhithRepository()
|
||||
public function testGetMetadataForSubclassWithMappedSuperclassWithRepository()
|
||||
{
|
||||
$class = $this->_factory->getMetadataFor('Doctrine\Tests\Models\DDC869\DDC869CreditCardPayment');
|
||||
|
||||
@ -101,9 +101,9 @@ class BasicInheritanceMappingTest extends \Doctrine\Tests\OrmTestCase
|
||||
/**
|
||||
* @group DDC-1203
|
||||
*/
|
||||
public function testUnmappedSuperclassInHierachy()
|
||||
public function testUnmappedSuperclassInHierarchy()
|
||||
{
|
||||
$class = $this->_factory->getMetadataFor(__NAMESPACE__ . '\\HierachyD');
|
||||
$class = $this->_factory->getMetadataFor(__NAMESPACE__ . '\\HierarchyD');
|
||||
|
||||
$this->assertTrue(isset($class->fieldMappings['id']));
|
||||
$this->assertTrue(isset($class->fieldMappings['a']));
|
||||
@ -113,11 +113,11 @@ class BasicInheritanceMappingTest extends \Doctrine\Tests\OrmTestCase
|
||||
/**
|
||||
* @group DDC-1204
|
||||
*/
|
||||
public function testUnmappedEntityInHierachy()
|
||||
public function testUnmappedEntityInHierarchy()
|
||||
{
|
||||
$this->setExpectedException('Doctrine\ORM\Mapping\MappingException', "Entity 'Doctrine\Tests\ORM\Mapping\HierachyBEntity' has to be part of the discriminator map of 'Doctrine\Tests\ORM\Mapping\HierachyBase' to be properly mapped in the inheritance hierachy. Alternatively you can make 'Doctrine\Tests\ORM\Mapping\HierachyBEntity' an abstract class to avoid this exception from occuring.");
|
||||
$this->setExpectedException('Doctrine\ORM\Mapping\MappingException', "Entity 'Doctrine\Tests\ORM\Mapping\HierarchyBEntity' has to be part of the discriminator map of 'Doctrine\Tests\ORM\Mapping\HierarchyBase' to be properly mapped in the inheritance hierarchy. Alternatively you can make 'Doctrine\Tests\ORM\Mapping\HierarchyBEntity' an abstract class to avoid this exception from occuring.");
|
||||
|
||||
$class = $this->_factory->getMetadataFor(__NAMESPACE__ . '\\HierachyE');
|
||||
$class = $this->_factory->getMetadataFor(__NAMESPACE__ . '\\HierarchyE');
|
||||
}
|
||||
|
||||
/**
|
||||
@ -148,9 +148,9 @@ class BasicInheritanceMappingTest extends \Doctrine\Tests\OrmTestCase
|
||||
* @group DDC-1156
|
||||
* @group DDC-1218
|
||||
*/
|
||||
public function testSequenceDefinitionInHierachyWithSandwichMappedSuperclass()
|
||||
public function testSequenceDefinitionInHierarchyWithSandwichMappedSuperclass()
|
||||
{
|
||||
$class = $this->_factory->getMetadataFor(__NAMESPACE__ . '\\HierachyD');
|
||||
$class = $this->_factory->getMetadataFor(__NAMESPACE__ . '\\HierarchyD');
|
||||
/* @var $class ClassMetadataInfo */
|
||||
|
||||
$this->assertInstanceOf('Doctrine\ORM\Id\SequenceGenerator', $class->idGenerator);
|
||||
@ -213,12 +213,12 @@ class EntitySubClass2 extends MappedSuperclassBase {
|
||||
* @InheritanceType("SINGLE_TABLE")
|
||||
* @DiscriminatorColumn(name="type", type="string", length=20)
|
||||
* @DiscriminatorMap({
|
||||
* "c" = "HierachyC",
|
||||
* "d" = "HierachyD",
|
||||
* "e" = "HierachyE"
|
||||
* "c" = "HierarchyC",
|
||||
* "d" = "HierarchyD",
|
||||
* "e" = "HierarchyE"
|
||||
* })
|
||||
*/
|
||||
abstract class HierachyBase
|
||||
abstract class HierarchyBase
|
||||
{
|
||||
/**
|
||||
* @Column(type="integer") @Id @GeneratedValue(strategy="SEQUENCE")
|
||||
@ -231,7 +231,7 @@ abstract class HierachyBase
|
||||
/**
|
||||
* @MappedSuperclass
|
||||
*/
|
||||
abstract class HierachyASuperclass extends HierachyBase
|
||||
abstract class HierarchyASuperclass extends HierarchyBase
|
||||
{
|
||||
/** @Column(type="string") */
|
||||
public $a;
|
||||
@ -240,7 +240,7 @@ abstract class HierachyASuperclass extends HierachyBase
|
||||
/**
|
||||
* @Entity
|
||||
*/
|
||||
class HierachyBEntity extends HierachyBase
|
||||
class HierarchyBEntity extends HierarchyBase
|
||||
{
|
||||
/** @Column(type="string") */
|
||||
public $b;
|
||||
@ -249,7 +249,7 @@ class HierachyBEntity extends HierachyBase
|
||||
/**
|
||||
* @Entity
|
||||
*/
|
||||
class HierachyC extends HierachyBase
|
||||
class HierarchyC extends HierarchyBase
|
||||
{
|
||||
/** @Column(type="string") */
|
||||
public $c;
|
||||
@ -258,7 +258,7 @@ class HierachyC extends HierachyBase
|
||||
/**
|
||||
* @Entity
|
||||
*/
|
||||
class HierachyD extends HierachyASuperclass
|
||||
class HierarchyD extends HierarchyASuperclass
|
||||
{
|
||||
/** @Column(type="string") */
|
||||
public $d;
|
||||
@ -267,7 +267,7 @@ class HierachyD extends HierachyASuperclass
|
||||
/**
|
||||
* @Entity
|
||||
*/
|
||||
class HierachyE extends HierachyBEntity
|
||||
class HierarchyE extends HierarchyBEntity
|
||||
{
|
||||
/** @Column(type="string") */
|
||||
public $e;
|
||||
|
@ -89,7 +89,7 @@ class ClassMetadataFactoryTest extends \Doctrine\Tests\OrmTestCase
|
||||
$actual = $cmf->getMetadataFor($cm1->name);
|
||||
}
|
||||
|
||||
public function testHasGetMetadata_NamespaceSeperatorIsNotNormalized()
|
||||
public function testHasGetMetadata_NamespaceSeparatorIsNotNormalized()
|
||||
{
|
||||
require_once __DIR__."/../../Models/Global/GlobalNamespaceModel.php";
|
||||
|
||||
@ -325,7 +325,7 @@ class ClassMetadataFactoryTest extends \Doctrine\Tests\OrmTestCase
|
||||
}
|
||||
}
|
||||
|
||||
/* Test subject class with overriden factory method for mocking purposes */
|
||||
/* Test subject class with overridden factory method for mocking purposes */
|
||||
class ClassMetadataFactoryTestSubject extends \Doctrine\ORM\Mapping\ClassMetadataFactory
|
||||
{
|
||||
private $mockMetadata = array();
|
||||
|
@ -80,7 +80,7 @@ class ClassMetadataTest extends \Doctrine\Tests\OrmTestCase
|
||||
/**
|
||||
* @group DDC-115
|
||||
*/
|
||||
public function testMapAssocationInGlobalNamespace()
|
||||
public function testMapAssociationInGlobalNamespace()
|
||||
{
|
||||
require_once __DIR__."/../../Models/Global/GlobalNamespaceModel.php";
|
||||
|
||||
@ -237,7 +237,7 @@ class ClassMetadataTest extends \Doctrine\Tests\OrmTestCase
|
||||
$cm->mapField(array('fieldName' => 'name', 'columnName' => 'name'));
|
||||
}
|
||||
|
||||
public function testDuplicateFieldAndAssocationMapping1_ThrowsException()
|
||||
public function testDuplicateFieldAndAssociationMapping1_ThrowsException()
|
||||
{
|
||||
$cm = new ClassMetadata('Doctrine\Tests\Models\CMS\CmsUser');
|
||||
$cm->initializeReflection(new \Doctrine\Common\Persistence\Mapping\RuntimeReflectionService);
|
||||
@ -248,7 +248,7 @@ class ClassMetadataTest extends \Doctrine\Tests\OrmTestCase
|
||||
$cm->mapOneToOne(array('fieldName' => 'name', 'targetEntity' => 'CmsUser'));
|
||||
}
|
||||
|
||||
public function testDuplicateFieldAndAssocationMapping2_ThrowsException()
|
||||
public function testDuplicateFieldAndAssociationMapping2_ThrowsException()
|
||||
{
|
||||
$cm = new ClassMetadata('Doctrine\Tests\Models\CMS\CmsUser');
|
||||
$cm->initializeReflection(new \Doctrine\Common\Persistence\Mapping\RuntimeReflectionService);
|
||||
@ -301,7 +301,7 @@ class ClassMetadataTest extends \Doctrine\Tests\OrmTestCase
|
||||
$cm = new ClassMetadata('Doctrine\Tests\Models\CMS\CmsAddress');
|
||||
$cm->initializeReflection(new \Doctrine\Common\Persistence\Mapping\RuntimeReflectionService);
|
||||
|
||||
// this is really dirty, but it's the simpliest way to test whether
|
||||
// this is really dirty, but it's the simplest way to test whether
|
||||
// joinColumn's name will be automatically set to user_id
|
||||
$cm->mapOneToOne(array(
|
||||
'fieldName' => 'user',
|
||||
@ -447,7 +447,7 @@ class ClassMetadataTest extends \Doctrine\Tests\OrmTestCase
|
||||
/**
|
||||
* @group DDC-117
|
||||
*/
|
||||
public function testInverseIdentifierAssocation()
|
||||
public function testInverseIdentifierAssociation()
|
||||
{
|
||||
$cm = new ClassMetadata('Doctrine\Tests\Models\DDC117\DDC117ArticleDetails');
|
||||
$cm->initializeReflection(new \Doctrine\Common\Persistence\Mapping\RuntimeReflectionService);
|
||||
@ -466,7 +466,7 @@ class ClassMetadataTest extends \Doctrine\Tests\OrmTestCase
|
||||
/**
|
||||
* @group DDC-117
|
||||
*/
|
||||
public function testIdentifierAssocationManyToMany()
|
||||
public function testIdentifierAssociationManyToMany()
|
||||
{
|
||||
$cm = new ClassMetadata('Doctrine\Tests\Models\DDC117\DDC117ArticleDetails');
|
||||
$cm->initializeReflection(new \Doctrine\Common\Persistence\Mapping\RuntimeReflectionService);
|
||||
@ -825,7 +825,7 @@ class ClassMetadataTest extends \Doctrine\Tests\OrmTestCase
|
||||
$cm->mapManyToOne(array('fieldName' => 'address', 'targetEntity' => 'UnknownClass'));
|
||||
|
||||
$this->setExpectedException("Doctrine\ORM\Mapping\MappingException", "The target-entity Doctrine\Tests\Models\CMS\UnknownClass cannot be found in 'Doctrine\Tests\Models\CMS\CmsUser#address'.");
|
||||
$cm->validateAssocations();
|
||||
$cm->validateAssociations();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -11,7 +11,7 @@ use Doctrine\Tests\Mocks\HydratorMockStatement,
|
||||
/**
|
||||
* Tests to prevent serious performance regressions.
|
||||
*
|
||||
* IMPORTANT: Be sure to run these tests withoug xdebug or similar tools that
|
||||
* IMPORTANT: Be sure to run these tests without xdebug or similar tools that
|
||||
* seriously degrade performance.
|
||||
*
|
||||
* @author robo
|
||||
|
@ -197,7 +197,7 @@ class SelectSqlGenerationTest extends \Doctrine\Tests\OrmTestCase
|
||||
}
|
||||
|
||||
/* NOT (YET?) SUPPORTED.
|
||||
Can be supported if SimpleSelectExpresion supports SingleValuedPathExpression instead of StateFieldPathExpression.
|
||||
Can be supported if SimpleSelectExpression supports SingleValuedPathExpression instead of StateFieldPathExpression.
|
||||
|
||||
public function testSingleAssociationPathExpressionInSubselect()
|
||||
{
|
||||
|
@ -128,7 +128,7 @@ class UpdateSqlGenerationTest extends \Doctrine\Tests\OrmTestCase
|
||||
);
|
||||
}
|
||||
|
||||
public function testSupportsGreatherThanClause()
|
||||
public function testSupportsGreaterThanClause()
|
||||
{
|
||||
$this->assertSqlGeneration(
|
||||
'UPDATE Doctrine\Tests\Models\CMS\CmsUser u SET u.status = ?1 WHERE u.id > ?2',
|
||||
@ -136,7 +136,7 @@ class UpdateSqlGenerationTest extends \Doctrine\Tests\OrmTestCase
|
||||
);
|
||||
}
|
||||
|
||||
public function testSupportsGreatherThanOrEqualToClause()
|
||||
public function testSupportsGreaterThanOrEqualToClause()
|
||||
{
|
||||
$this->assertSqlGeneration(
|
||||
'UPDATE Doctrine\Tests\Models\CMS\CmsUser u SET u.status = ?1 WHERE u.id >= ?2',
|
||||
|
@ -355,7 +355,7 @@ abstract class AbstractClassMetadataExporterTest extends \Doctrine\Tests\OrmTest
|
||||
$this->assertEquals('all', $value['Doctrine\Tests\ORM\Tools\Export\ExportedUser']['oneToMany']['interests']['cascade'][0]);
|
||||
|
||||
} else {
|
||||
$this->markTestSkipped('Test aviable only for '.$type.' dirver');
|
||||
$this->markTestSkipped('Test available only for '.$type.' driver');
|
||||
}
|
||||
}
|
||||
public function __destruct()
|
||||
|
@ -11,7 +11,7 @@ require_once __DIR__ . '/../../TestInit.php';
|
||||
|
||||
class SchemaToolTest extends \Doctrine\Tests\OrmTestCase
|
||||
{
|
||||
public function testAddUniqueIndexForUniqueFieldAnnocation()
|
||||
public function testAddUniqueIndexForUniqueFieldAnnotation()
|
||||
{
|
||||
$em = $this->_getTestEntityManager();
|
||||
$schemaTool = new SchemaTool($em);
|
||||
|
@ -237,7 +237,7 @@ abstract class OrmFunctionalTestCase extends OrmTestCase
|
||||
}
|
||||
if (isset($this->_usedModelSets['directorytree'])) {
|
||||
$conn->executeUpdate('DELETE FROM ' . $this->_em->getConnection()->getDatabasePlatform()->quoteIdentifier("file"));
|
||||
// MySQL doesnt know deferred deletions therefore only executing the second query gives errors.
|
||||
// MySQL doesn't know deferred deletions therefore only executing the second query gives errors.
|
||||
$conn->executeUpdate('DELETE FROM Directory WHERE parentDirectory_id IS NOT NULL');
|
||||
$conn->executeUpdate('DELETE FROM Directory');
|
||||
}
|
||||
|
@ -16,7 +16,7 @@ require_once 'PHPUnit/Framework.php';
|
||||
/**
|
||||
* A more flexible and powerful PHPUnit Task than the native Phing one.
|
||||
*
|
||||
* Plus forward compability for PHPUnit 3.5 and later is ensured by using the PHPUnit Test Runner instead of implementing one.
|
||||
* Plus forward compatibility for PHPUnit 3.5 and later is ensured by using the PHPUnit Test Runner instead of implementing one.
|
||||
*
|
||||
* @author Benjamin Eberlei <kontakt@beberlei.de>
|
||||
*/
|
||||
|
@ -2,7 +2,7 @@
|
||||
<!--
|
||||
Use this configuration file as a template to run the tests against any dbms.
|
||||
Procedure:
|
||||
1) Save a copy of this file with a name of your chosing. It doesn't matter
|
||||
1) Save a copy of this file with a name of your choosing. It doesn't matter
|
||||
where you place it as long as you know where it is.
|
||||
i.e. "mysqlconf.xml" (It needs the ending .xml).
|
||||
2) Edit the file and fill in your settings (database name, type, username, etc.)
|
||||
|
Loading…
Reference in New Issue
Block a user