[DDC-1151] Table name at reference is not quoted, even if table name in entity has quotation marks. Created: 07/May/11  Updated: 14/May/11  Resolved: 14/May/11

Status: Resolved
Project: Doctrine 2 - ORM
Component/s: None
Affects Version/s: 2.0.3, 2.0.4
Fix Version/s: 2.0.5
Security Level: All

Type: Bug Priority: Major
Reporter: Margus Sipria Assignee: Benjamin Eberlei
Resolution: Fixed Votes: 0
Labels: None


 Description   

Reference for PostgreSQL and MySQL is folloing:

ALTER TABLE "user_group" ADD FOREIGN KEY (user_id) REFERENCES user(id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE "user_group" ADD FOREIGN KEY (group_id) REFERENCES group(id) NOT DEFERRABLE INITIALLY IMMEDIATE

Entity is quoted:

/**
 * @Entity @Table(name="`user`")
 */


 Comments   
Comment by Benjamin Eberlei [ 14/May/11 ]

Moved to ORM as its a SChemaTool bug

Comment by Benjamin Eberlei [ 14/May/11 ]

Fixed





[DDC-1136] Prevent backup files to be recognized as valid Entity files Created: 05/May/11  Updated: 14/May/11  Resolved: 14/May/11

Status: Resolved
Project: Doctrine 2 - ORM
Component/s: Tools
Affects Version/s: 2.0.4, Git Master
Fix Version/s: 2.0.5
Security Level: All

Type: Bug Priority: Major
Reporter: Fabien Potencier Assignee: Benjamin Eberlei
Resolution: Fixed Votes: 0
Labels: None
Environment:

all



 Description   

The Doctrine2 generator backup Entity files when it adds code into them. The files are named after the original file with a ~ prepended.

The problem is that these backup files are valid PHP files, and as such, they are loaded by Doctrine2. A PHP fatal error is then fired: "Cannot redeclare class...".

Instead of prepending , why not appending ~, which is a well supported convention? (foo.php vs ~foo.php)

Patch is here: https://github.com/doctrine/doctrine2/pull/35



 Comments   
Comment by Benjamin Eberlei [ 14/May/11 ]

Applied and merged to 2.0.x





[DDC-1134] Entity Generator: Namespace parsing fix Created: 30/Apr/11  Updated: 01/May/11  Resolved: 01/May/11

Status: Resolved
Project: Doctrine 2 - ORM
Component/s: Tools
Affects Version/s: 2.0.4, Git Master
Fix Version/s: 2.0.5
Security Level: All

Type: Bug Priority: Major
Reporter: Fabien Potencier Assignee: Benjamin Eberlei
Resolution: Fixed Votes: 0
Labels: None
Environment:

any



 Description   

The entity generator is not able to parse the namespace/class of existing entities in many cases. Here is a simple class that fails:

<?php namespace Foo\Bar; use Foo; class Baz {}

Fix is here: https://github.com/doctrine/doctrine2/pull/49



 Comments   
Comment by Benjamin Eberlei [ 30/Apr/11 ]

Schedule for 2.0.5

Comment by Benjamin Eberlei [ 01/May/11 ]

Fixed in master and 2.0.x





[DDC-1133] DuckType AnnotationReader in AnnotationDriver Created: 30/Apr/11  Updated: 30/Apr/11  Resolved: 30/Apr/11

Status: Resolved
Project: Doctrine 2 - ORM
Component/s: Mapping Drivers
Affects Version/s: None
Fix Version/s: 2.0.5, 2.1
Security Level: All

Type: Improvement Priority: Major
Reporter: Benjamin Eberlei Assignee: Benjamin Eberlei
Resolution: Fixed Votes: 0
Labels: None


 Description   

Currently the hint is strict in AnnotationDriver for the AnnotationReader. This should be duck-typed to support usage of https://github.com/schmittjoh/annotations



 Comments   
Comment by Benjamin Eberlei [ 30/Apr/11 ]

Implemented





[DDC-1132] Reverse Engeneering Fatal Error Created: 30/Apr/11  Updated: 30/Apr/11  Resolved: 30/Apr/11

Status: Resolved
Project: Doctrine 2 - ORM
Component/s: None
Affects Version/s: None
Fix Version/s: 2.0.5
Security Level: All

Type: Bug Priority: Major
Reporter: Benjamin Eberlei Assignee: Benjamin Eberlei
Resolution: Fixed Votes: 0
Labels: None


 Description   

Following this cookbook article
http://symfony.com/doc/2.0/cookbook/doctrine/reverse_engineering.html

When I run the command, I get an error:

php app/console doctrine:mapping:convert xml ./src/Acme/BlogBundle/Resources/config/doctrine/metada/orm --from-database --force
PHP Notice: Undefined variable: otherFk in /var/www/sn/vendor/doctrine/lib/Doctrine/ORM/Mapping/Driver/DatabaseDriver.php on line 205
PHP Stack trace:
PHP 1. {main}() /var/www/sn/app/console:0
PHP 2. Symfony\Component\Console\Application->run() /var/www/sn/app/console:16
PHP 3. Symfony\Bundle\FrameworkBundle\Console\Application->doRun() /var/www/sn/vendor/symfony/src/Symfony/Component/Console/Application.php:119
PHP 4. Symfony\Component\Console\Application->doRun() /var/www/sn/vendor/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php:77
PHP 5. Symfony\Component\Console\Command\Command->run() /var/www/sn/vendor/symfony/src/Symfony/Component/Console/Application.php:193
PHP 6. Symfony\Bundle\DoctrineBundle\Command\ConvertMappingDoctrineCommand->execute() /var/www/sn/vendor/symfony/src/Symfony/Component/Console/Command/Command.php:188
PHP 7. Doctrine\ORM\Tools\Console\Command\ConvertMappingCommand->execute() /var/www/sn/vendor/symfony/src/Symfony/Bundle/DoctrineBundle/Command/ConvertMappingDoctrineCommand.php:48
PHP 8. Doctrine\ORM\Mapping\ClassMetadataFactory->getAllMetadata() /var/www/sn/vendor/doctrine/lib/Doctrine/ORM/Tools/Console/Command/ConvertMappingCommand.php:119
PHP 9. Doctrine\ORM\Mapping\ClassMetadataFactory->getMetadataFor() /var/www/sn/vendor/doctrine/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php:123
PHP 10. Doctrine\ORM\Mapping\ClassMetadataFactory->loadMetadata() /var/www/sn/vendor/doctrine/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php:176
PHP 11. Doctrine\ORM\Mapping\Driver\DatabaseDriver->loadMetadataForClass() /var/www/sn/vendor/doctrine/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php:282

Notice: Undefined variable: otherFk in /var/www/sn/vendor/doctrine/lib/Doctrine/ORM/Mapping/Driver/DatabaseDriver.php on line 205

Call Stack:
0.0036 328024 1. {main}() /var/www/sn/app/console:0
5.6943 13982540 2. Symfony\Component\Console\Application->run() /var/www/sn/app/console:16
5.7041 14171544 3. Symfony\Bundle\FrameworkBundle\Console\Application->doRun() /var/www/sn/vendor/symfony/src/Symfony/Component/Console/Application.php:119
5.7043 14171544 4. Symfony\Component\Console\Application->doRun() /var/www/sn/vendor/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php:77
5.7105 14171588 5. Symfony\Component\Console\Command\Command->run() /var/www/sn/vendor/symfony/src/Symfony/Component/Console/Application.php:193
5.7140 14172700 6. Symfony\Bundle\DoctrineBundle\Command\ConvertMappingDoctrineCommand->execute() /var/www/sn/vendor/symfony/src/Symfony/Component/Console/Command/Command.php:188
5.7980 16246052 7. Doctrine\ORM\Tools\Console\Command\ConvertMappingCommand->execute() /var/www/sn/vendor/symfony/src/Symfony/Bundle/DoctrineBundle/Command/ConvertMappingDoctrineCommand.php:48
5.8131 16613668 8. Doctrine\ORM\Mapping\ClassMetadataFactory->getAllMetadata() /var/www/sn/vendor/doctrine/lib/Doctrine/ORM/Tools/Console/Command/ConvertMappingCommand.php:119
7.9402 18186692 9. Doctrine\ORM\Mapping\ClassMetadataFactory->getMetadataFor() /var/www/sn/vendor/doctrine/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php:123
7.9402 18186692 10. Doctrine\ORM\Mapping\ClassMetadataFactory->loadMetadata() /var/www/sn/vendor/doctrine/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php:176
7.9489 18458388 11. Doctrine\ORM\Mapping\Driver\DatabaseDriver->loadMetadataForClass() /var/www/sn/vendor/doctrine/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php:282

PHP Fatal error: Call to a member function getColumns() on a non-object in /var/www/sn/vendor/doctrine/lib/Doctrine/ORM/Mapping/Driver/DatabaseDriver.php on line 205
PHP Stack trace:
PHP 1. {main}() /var/www/sn/app/console:0
PHP 2. Symfony\Component\Console\Application->run() /var/www/sn/app/console:16
PHP 3. Symfony\Bundle\FrameworkBundle\Console\Application->doRun() /var/www/sn/vendor/symfony/src/Symfony/Component/Console/Application.php:119
PHP 4. Symfony\Component\Console\Application->doRun() /var/www/sn/vendor/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php:77
PHP 5. Symfony\Component\Console\Command\Command->run() /var/www/sn/vendor/symfony/src/Symfony/Component/Console/Application.php:193
PHP 6. Symfony\Bundle\DoctrineBundle\Command\ConvertMappingDoctrineCommand->execute() /var/www/sn/vendor/symfony/src/Symfony/Component/Console/Command/Command.php:188
PHP 7. Doctrine\ORM\Tools\Console\Command\ConvertMappingCommand->execute() /var/www/sn/vendor/symfony/src/Symfony/Bundle/DoctrineBundle/Command/ConvertMappingDoctrineCommand.php:48
PHP 8. Doctrine\ORM\Mapping\ClassMetadataFactory->getAllMetadata() /var/www/sn/vendor/doctrine/lib/Doctrine/ORM/Tools/Console/Command/ConvertMappingCommand.php:119
PHP 9. Doctrine\ORM\Mapping\ClassMetadataFactory->getMetadataFor() /var/www/sn/vendor/doctrine/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php:123
PHP 10. Doctrine\ORM\Mapping\ClassMetadataFactory->loadMetadata() /var/www/sn/vendor/doctrine/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php:176
PHP 11. Doctrine\ORM\Mapping\Driver\DatabaseDriver->loadMetadataForClass() /var/www/sn/vendor/doctrine/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php:282

Fatal error: Call to a member function getColumns() on a non-object in /var/www/sn/vendor/doctrine/lib/Doctrine/ORM/Mapping/Driver/DatabaseDriver.php on line 205

Call Stack:
0.0036 328024 1. {main}() /var/www/sn/app/console:0
5.6943 13982540 2. Symfony\Component\Console\Application->run() /var/www/sn/app/console:16
5.7041 14171544 3. Symfony\Bundle\FrameworkBundle\Console\Application->doRun() /var/www/sn/vendor/symfony/src/Symfony/Component/Console/Application.php:119
5.7043 14171544 4. Symfony\Component\Console\Application->doRun() /var/www/sn/vendor/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php:77
5.7105 14171588 5. Symfony\Component\Console\Command\Command->run() /var/www/sn/vendor/symfony/src/Symfony/Component/Console/Application.php:193
5.7140 14172700 6. Symfony\Bundle\DoctrineBundle\Command\ConvertMappingDoctrineCommand->execute() /var/www/sn/vendor/symfony/src/Symfony/Component/Console/Command/Command.php:188
5.7980 16246052 7. Doctrine\ORM\Tools\Console\Command\ConvertMappingCommand->execute() /var/www/sn/vendor/symfony/src/Symfony/Bundle/DoctrineBundle/Command/ConvertMappingDoctrineCommand.php:48
5.8131 16613668 8. Doctrine\ORM\Mapping\ClassMetadataFactory->getAllMetadata() /var/www/sn/vendor/doctrine/lib/Doctrine/ORM/Tools/Console/Command/ConvertMappingCommand.php:119
7.9402 18186692 9. Doctrine\ORM\Mapping\ClassMetadataFactory->getMetadataFor() /var/www/sn/vendor/doctrine/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php:123
7.9402 18186692 10. Doctrine\ORM\Mapping\ClassMetadataFactory->loadMetadata() /var/www/sn/vendor/doctrine/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php:176
7.9489 18458388 11. Doctrine\ORM\Mapping\Driver\DatabaseDriver->loadMetadataForClass() /var/www/sn/vendor/doctrine/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php:282


 Comments   
Comment by Benjamin Eberlei [ 30/Apr/11 ]

Fixed





[DDC-1129] UnitOfWork consider version field changed as entity changed Created: 28/Apr/11  Updated: 01/May/11  Resolved: 01/May/11

Status: Resolved
Project: Doctrine 2 - ORM
Component/s: ORM
Affects Version/s: Git Master
Fix Version/s: 2.0.5
Security Level: All

Type: Bug Priority: Major
Reporter: Konstantin Assignee: Benjamin Eberlei
Resolution: Fixed Votes: 0
Labels: None


 Description   

I use @version field and after first save it thinks that versionField was changed.

$Entity = $em->find(...);
$Entity->changeField();
$em->persist($Entity);
$em->flush();
$em->getUnitOfWork()->computeChangeSets();
var_dump($em->getUnitOfWork()->getEntityChangeSet($Entity);
array(1) {
  ["version"]=>
  array(2) {
    [0]=>
    int(183)
    [1]=>
    int(184)
  }
}

I fixed it in method computeChangeSet on lines around 473:

Index: ../vendor/doctrine/lib/Doctrine/ORM/UnitOfWork.php
===================================================================
@@ -448,6 +448,9 @@
             $changeSet = $isChangeTrackingNotify ? $this->entityChangeSets[$oid] : array();
 
             foreach ($actualData as $propName => $actualValue) {
+                if ($class->isVersioned && $propName == $class->versionField) {
+                    continue;
+                }
                 $orgValue = isset($originalData[$propName]) ? $originalData[$propName] : null;
                 if (isset($class->associationMappings[$propName])) {
                     $assoc = $class->associationMappings[$propName];


 Comments   
Comment by Benjamin Eberlei [ 30/Apr/11 ]

The fix is bad. There is a much better way, but i can confirm this issue exists.

Comment by Benjamin Eberlei [ 01/May/11 ]

Fixed.





[DDC-1121] Doctrine CLI tool produces wrong schema when the id columns of the entities are not named as $id. The annotations block aren't taken into account Created: 20/Apr/11  Updated: 01/May/11  Resolved: 01/May/11

Status: Resolved
Project: Doctrine 2 - ORM
Component/s: Tools
Affects Version/s: 2.0.4
Fix Version/s: 2.0.5
Security Level: All

Type: Bug Priority: Major
Reporter: Eddie O'Donnell Assignee: Benjamin Eberlei
Resolution: Invalid Votes: 0
Labels: None
Environment:

Windows xp sp3, php 5.3.6, apache 2.2.17


Attachments: Zip Archive mydoctrine.zip    

 Description   
namespace Entities;

//use Doctrine\Common\Collections\ArrayCollection;

/** 
 *@Entity
 *@Table(name="user")
 */
class User
{
	/** 
	*@Id 
	*@Column(type="integer", name="user_id")
	*@GeneratedValue
	* */
    private $userId;
	
	/** @Column(length=255) */
    private $lastName;
	
	/** @Column(length=255, name="user_firstname") */
    private $firstName;
	
	 /**
     * Bidirectional - Many users are geathered within one group (OWNING SIDE)
     *
     * @ManyToOne(targetEntity="\Entities\Group", inversedBy="user")
     */
	private $group;
	
/// ---
}
<?php
namespace Entities;
/** 
 *@Entity
 *@Table(name="group")
 */
class Group
{
	/** 
	*@Id 
	*@Column(type="integer", name="group_id")
	*@GeneratedValue
	* */
    private $groupId;
	
	/** @Column(name="group_name") */
    private $name;
	
    /**
     * @OneToMany(targetEntity="\Entities\User", mappedBy="group")
     */
    private $users;

    public function __construct() {
        $this->users = new \Doctrine\Common\Collections\ArrayCollection();
    }
}

In the following examples the id fields are set to $userId (mapped to user_id) and $groupId (mapped to group_id), but when it comes to generating the schema an error occures. The Doctrine CLI Tool doesn't work properly. When it generates the schema it fails to take into account the annotation blocks and just uses "id" instead of "group_id".

Let me explain it better. If we run the tool it will produce the following code

...

ALTER TABLE user ADD FOREIGN KEY (group_id) REFERENCES group(id)

instead of

ALTER TABLE `user`  ADD  FOREIGN KEY (`group_id`) REFERENCES `groups` (`group_id`);

Moreover using "group" as a name of the entity class will lead to numerous problems, because it's a reserved word in SQL. Even if we specify the quoatation forcibly using backticks it won't work:

 /**@Table(name="`group`")*/
Class Group {

The quoatation won't be taken into account while generation the schema.

I'm enclosing the files I've tried to play with. Just try to generate the schema.



 Comments   
Comment by Benjamin Eberlei [ 30/Apr/11 ]

Fixed formatting, scheduled for 2.0.5

Comment by Benjamin Eberlei [ 01/May/11 ]

Just understood this. This is expected behavior, "id" is the default value. Doctrine cannot - for optimization reasons - check the id column names on the other entity. That is what the @JoinColumn annotation is for, where you can explicitly give a name.





[DDC-1119] CLONE -Call to undefined method Doctrine\DBAL\Platforms\MySqlPlatform::quote() Created: 18/Apr/11  Updated: 01/May/11  Resolved: 01/May/11

Status: Resolved
Project: Doctrine 2 - ORM
Component/s: ORM
Affects Version/s: 2.0-ALPHA2
Fix Version/s: 2.0.5
Security Level: All

Type: Bug Priority: Major
Reporter: Christian Ehmke Assignee: Benjamin Eberlei
Resolution: Fixed Votes: 0
Labels: None
Environment:

trunk



 Description   

Fatal error: Call to undefined method Doctrine\DBAL\Platforms\MySqlPlatform::quote() in /srv/abf/trunk/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php on line 1181

I think you should use quoteIdentifier instead of quote



 Comments   
Comment by Christian Ehmke [ 18/Apr/11 ]

Version 2.0.4

Fatal error: Call to undefined method Doctrine\DBAL\Platforms\MySqlPlatform::quote() in \Doctrine\DBAL\Platforms\MySqlPlatform.php on line 373

There is no such function implemented in MySqlPlatform or AbstractPlatform.

Comment by Benjamin Eberlei [ 01/May/11 ]

Fixed





[DDC-1111] EntityGenerator duplicates attributes, getters and setters in mapped subclasses Created: 12/Apr/11  Updated: 01/May/11  Resolved: 01/May/11

Status: Resolved
Project: Doctrine 2 - ORM
Component/s: ORM
Affects Version/s: 2.0.3
Fix Version/s: 2.0.5
Security Level: All

Type: Bug Priority: Major
Reporter: Stephan Petzl Assignee: Benjamin Eberlei
Resolution: Duplicate Votes: 1
Labels: None
Environment:

mac osx, symfony framework (standard distribution PR10) with installed userbundle



 Description   

when I want to generate getters and setters for my entity which subclasses another entity-base-class, my properties are duplicated.

before generating:

Unable to find source-code formatter for language: php. Available languages are: actionscript, html, java, javascript, none, sql, xhtml, xml
/**
 * @orm:Entity
 */
class User extends BaseUser
{
    /**
     * @orm:Id
     * @orm:Column(type="integer")
     * @orm:generatedValue(strategy="AUTO")
     */
    protected $id;
}

after generating:

Unable to find source-code formatter for language: php. Available languages are: actionscript, html, java, javascript, none, sql, xhtml, xml
/**
 * @orm:Entity
 */
class User extends BaseUser
{
    /**
     * @orm:Id
     * @orm:Column(type="integer")
     * @orm:generatedValue(strategy="AUTO")
     */
    protected $id;


    /**
     * @var integer $id
     */
    private $id;


    /**
     * Get id
     *
     * @return integer $id
     */
    public function getId()
    {
        return $this->id;
    }
}

SuperSuperClass (there are multiple levels of inheritance...):

Unable to find source-code formatter for language: php. Available languages are: actionscript, html, java, javascript, none, sql, xhtml, xml
abstract class User implements UserInterface
{
    protected $id;
   //...
}


 Comments   
Comment by Benjamin Eberlei [ 01/May/11 ]

Duplicate of DDC-1134, fixed





[DDC-1109] SINGLE_TABLE mapping fails to set the discriminator column value on persist if the mapping classes are specified with fully qualified namespace Created: 10/Apr/11  Updated: 30/Apr/11  Resolved: 30/Apr/11

Status: Resolved
Project: Doctrine 2 - ORM
Component/s: ORM
Affects Version/s: 2.0.4
Fix Version/s: 2.0.5
Security Level: All

Type: Bug Priority: Minor
Reporter: Simon Zamecnik Assignee: Benjamin Eberlei
Resolution: Fixed Votes: 0
Labels: None
Environment:

Debian GNU/Linux 6.0, mysql 5.1.56-0.dotdeb.1, PHP 5.3.5-0.dotdeb.1


Attachments: File sandbox-example.tar.bz2    

 Description   

If I specify a single inheritance structure with the mapping classes specified with fully qualified namespace in the annotation and then if I create a new mapped entity and try to save it, doctrine specifies the value for the discriminator column as NULL and thus the fush fails with mysql complaining the discriminator column to be NULL. If I specify the mapping classes without fully qualified namespace the persist works as expected

For example this fails:

<?php
namespace Entities;
/**
 * @Entity
 * @InheritanceType("SINGLE_TABLE")
 * @DiscriminatorColumn(name="itemType", type="integer")
 * @DiscriminatorMap({
 * "0"="\Entities\Data\Integer",
 * "5"="\Entities\Data\Text",
 * "6"="\Entities\Data\Form"
 * })
 */
class master {

But this works as expected:

<?php
namespace Entities;
/**
 * @Entity
 * @InheritanceType("SINGLE_TABLE")
 * @DiscriminatorColumn(name="itemType", type="integer")
 * @DiscriminatorMap({
 * "0"="Entities\Data\Integer",
 * "5"="Entities\Data\Text",
 * "6"="Entities\Data\Form"
 * })
 */
class master {

The obivous workaround for now is to not use fully qualified namespaced classes for the discriminator maps, but rather relative.

attached is the doctrine sanbox with the failing setup



 Comments   
Comment by Benjamin Eberlei [ 30/Apr/11 ]

Namespaces are never referred with a leading prefix in strings. This is PHP convention. However we can easily ltrim the slash here in the mapping drivers for convenenince.

schedulding for 2.0.5

Comment by Benjamin Eberlei [ 30/Apr/11 ]

Fixed.





[DDC-1108] Parameters name of a single letter don't work Created: 09/Apr/11  Updated: 30/Apr/11  Resolved: 30/Apr/11

Status: Resolved
Project: Doctrine 2 - ORM
Component/s: DQL
Affects Version/s: Git Master
Fix Version/s: 2.0.5
Security Level: All

Type: Bug Priority: Major
Reporter: Christophe Coevoet Assignee: Benjamin Eberlei
Resolution: Fixed Votes: 0
Labels: None


 Description   

"SELECT c FROM MyBundle\AppBundle\Entity\Cities c WHERE c.nume LIKE :q" throws an Exception in Doctrine\ORM\Query\AST\InputParameter line 46 because strlen return 1.
I don't know the DQL parser deeply but it seems that the value passed to this class does not contain the colon. In this case the exception does not make sense here.



 Comments   
Comment by Benjamin Eberlei [ 30/Apr/11 ]

Fixed





[DDC-1102] Typo in ORM/Tools/EntityGenerator.php Created: 05/Apr/11  Updated: 01/May/11  Resolved: 01/May/11

Status: Resolved
Project: Doctrine 2 - ORM
Component/s: ORM
Affects Version/s: Git Master
Fix Version/s: 2.0.5
Security Level: All

Type: Bug Priority: Trivial
Reporter: Alex Mancini Assignee: Benjamin Eberlei
Resolution: Fixed Votes: 0
Labels: None


 Description   

There is a typo in ORM/Tools/EntityGenerator.php (line 502 in github master): MappedSupperClass instead of MappedSuperClass



 Comments   
Comment by Benjamin Eberlei [ 01/May/11 ]

Fixed





[DDC-1091] Parser::FunctionsReturningStrings() doesn't check for custom DQL functions. Created: 31/Mar/11  Updated: 01/May/11  Resolved: 01/May/11

Status: Resolved
Project: Doctrine 2 - ORM
Component/s: DQL
Affects Version/s: 2.0.3
Fix Version/s: 2.0.5
Security Level: All

Type: Bug Priority: Major
Reporter: Alexandre Mathieu Assignee: Benjamin Eberlei
Resolution: Fixed Votes: 0
Labels: None
Environment:

N/A


Attachments: File bDqlNvl.php    

 Description   

I defined a custom DQL FunctionNode that wasn't detected by the Parser.
Problem was in the Parser::FunctionsReturningStrings(), but I suspect the problem is more general.

Here's my (ugly) fix:

public function FunctionsReturningStrings()
{
$funcNameLower = strtolower($this->_lexer->lookahead['value']);
if (isset(self::$_STRING_FUNCTIONS[$funcNameLower]))

{ $funcClass = self::$_STRING_FUNCTIONS[$funcNameLower]; $function = new $funcClass($funcNameLower); $function->parse($this); }

else $function = $this->CustomFunctionsReturningStrings();

return $function;
}

I include the custom DQL FunctionNode created.



 Comments   
Comment by Benjamin Eberlei [ 01/May/11 ]

Fixed





[DDC-1090] API Documentation for Doctrine\DBAL\Logging\SQLLogger::startQuery() is Incorrect Created: 31/Mar/11  Updated: 13/May/11  Resolved: 13/May/11

Status: Resolved
Project: Doctrine 2 - ORM
Component/s: Documentation
Affects Version/s: 2.0.3
Fix Version/s: 2.0.5
Security Level: All

Type: Documentation Priority: Minor
Reporter: Kevin Herrera Assignee: Benjamin Eberlei
Resolution: Fixed Votes: 0
Labels: None
Environment:

N/A


Attachments: PNG File Screen shot 2011-03-30 at 10.01.19 PM.png     PNG File Screen shot 2011-03-30 at 10.02.16 PM.png    

 Description   

This page displays contradicting information about the startQuery() interface method: http://www.doctrine-project.org/api/dbal/2.0/doctrine/dbal/logging/sqllogger.html

The $types argument is documented as $executionMS, which is not even in the method declaration.



 Comments   
Comment by Guilherme Blanco [ 13/May/11 ]

Fixed on master.

https://github.com/doctrine/dbal/commit/10ff0e0e6f327976cf9998b44a54168a568a0264





[DDC-994] YAML parser seems out of date (and references an undefined variable Created: 20/Jan/11  Updated: 01/May/11  Resolved: 01/May/11

Status: Resolved
Project: Doctrine 2 - ORM
Component/s: Tools
Affects Version/s: 2.0
Fix Version/s: 2.0.5
Security Level: All

Type: Task Priority: Major
Reporter: Lukas Kahwe Assignee: Benjamin Eberlei
Resolution: Fixed Votes: 0
Labels: None


 Description   

line: 158
$merged = array_merge($merge, $parsed);

but $merge is no where defined

when i compared it against current Symfony2 the file seemed quite a bit different.



 Comments   
Comment by Benjamin Eberlei [ 01/May/11 ]

This was fixed.





Generated at Thu Sep 18 07:52:49 UTC 2014 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.