[DDC-3401] __load should not mark proxied entity as initialized when initialization fails Created: 19/Nov/14  Updated: 25/Nov/14  Resolved: 25/Nov/14

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

Type: Bug Priority: Major
Reporter: Oleg Namaka Assignee: Marco Pivetta
Resolution: Won't Fix Votes: 0
Labels: lazy-loading, proxy


 Description   

Imagine this situation:

   //$entity2 is instance of \Doctrine\ORM\Proxy\Proxy which fails to load
    try {
       $entity2 = $entity->getEntity2();
   } catch (\Doctrine\ORM\EntityNotFoundException $e) {
       //the exception is caught
       // $entity2 is marked as initialized but its data is missing
   }

Then somewhere else in code:

 //$entity2 is instance of \Doctrine\ORM\Proxy\Proxy which fails to load
    try {
       $entity2 = $entity->getEntity2();
   } catch (\Doctrine\ORM\EntityNotFoundException $e) {
       //the exception is not caught since $entity2 is already initialized
   }
   foreach ($entity3->getSomeCollection() as $element) {
   // breaks since all internal data is missing

The fix to \Doctrine\Common\Persistence\Proxy::__load should look something like this:

        if (!$this->__isInitialized__ && $this->_entityPersister) {
//            $this->__isInitialized__ = true; --> this line is moved down below

            if (method_exists($this, "__wakeup")) {
                // call this after __isInitialized__to avoid infinite recursion
                // but before loading to emulate what ClassMetadata::newInstance()
                // provides.
                $this->__wakeup();
            }

            if ($this->_entityPersister->load($this->_identifier, $this) === null) {
                throw new \Doctrine\ORM\EntityNotFoundException();
            }
            unset($this->_entityPersister, $this->_identifier);
            $this->__isInitialized__ = true;
        }


 Comments   
Comment by Marco Pivetta [ 19/Nov/14 ]

The initialization flag has to be moved to the top, as initialization can recurse otherwise.

If you can abstract this into a test case, then I'll gladly try working on it.

Comment by Marco Pivetta [ 19/Nov/14 ]

Does the issue also affect 2.4?

Comment by Oleg Namaka [ 24/Nov/14 ]

@Marco, I do not know about 2.4 since I do not have it installed.

Regarding your first comment:

The initialization flag has to be moved to the top, as initialization can recurse otherwise.

In this case you can either introduce an independent flag to mitigate this problem or you can re-set the flag back to false in the following block right before an exception is thrown:

if ($this->_entityPersister->load($this->_identifier, $this) === null) {
    $this->__isInitialized__ = false;
    throw new \Doctrine\ORM\EntityNotFoundException();
}
Comment by Marco Pivetta [ 24/Nov/14 ]

I don't think that we are going to patch 2.3 anymore, so I suggest upgrading to 2.4, as this issue may likely have been fixed.

Consider that the entire proxy layer has been re-written: https://github.com/doctrine/doctrine2/blob/88ce68e733a02b84eb229c8447409b2ed5cf71ac/lib/Doctrine/ORM/Proxy/ProxyFactory.php#L175

Comment by Oleg Namaka [ 25/Nov/14 ]

@Marco, I installed 2.4 as you suggested but it seems that the issue is not fixed in it either. Look at a proxy __load generated in 2.4:

/** @private */
    public function __load()
    {
        if (!$this->__isInitialized__ && $this->_entityPersister) {
            $this->__isInitialized__ = true;

            if (method_exists($this, "__wakeup")) {
                // call this after __isInitialized__to avoid infinite recursion
                // but before loading to emulate what ClassMetadata::newInstance()
                // provides.
                $this->__wakeup();
            }

            if ($this->_entityPersister->load($this->_identifier, $this) === null) {
                throw new \Doctrine\ORM\EntityNotFoundException();
            }
            unset($this->_entityPersister, $this->_identifier);
        }
    } 

It looks identical to Proxy::__load generated in 2.3

Comment by Oleg Namaka [ 25/Nov/14 ]

@Marco, please disregard my previous comment as incorrect. This issue probably is fixed as a new proxy looks totally different. I will confirm it later today.

Comment by Marco Pivetta [ 25/Nov/14 ]

Marking as resolved in 2.4, won't fix for 2.3





[DDC-2230] Changes from DDC-1690 trigger a bug in entity merging Created: 09/Jan/13  Updated: 12/Nov/14  Resolved: 26/Feb/13

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

Type: Bug Priority: Critical
Reporter: Patrick Schwisow Assignee: Marco Pivetta
Resolution: Fixed Votes: 0
Labels: None


 Description   

Following the changes for DDC-1690, I encountered a serious bug in how EntityManager::merge(...) functions for entities that use NOTIFY change tracking. It's related to interaction between lazy loading and calls to addPropertyChangedListener().

Scenario:

  • EntityA has a One-To-One, lazy-load association to EntityB
  • EntityB implements NotifyPropertyChanged and uses change tracking policy "NOTIFY"

Steps to reproduce:

  1. $instanceA = $em->find('EntityA', $id)
  2. $em->clear()
  3. $instanceA = $em->merge($instanceA)
  4. $instanceA->getB() will return a proxy for B that is marked as initialized by contains no data

Workaround: Mark EntityB::addPropertyChangedListener(...) as 'final', so it doesn't get proxied and lazy loading is not triggered.



 Comments   
Comment by Patrick Schwisow [ 09/Jan/13 ]

Also, the returned proxy from $instanceA->getB() is in the entityStates array but not in the identity map

Comment by Marco Pivetta [ 23/Jan/13 ]

Looks like this one is related to DDC-1734

Comment by Marco Pivetta [ 23/Feb/13 ]

I implemented a fix at https://github.com/Ocramius/doctrine2/compare/hotfix;DDC-2230

Please let me know if that branch works for you: I will open a PR tomorrow.

Comment by Benjamin Eberlei [ 23/Feb/13 ]

A related Github Pull-Request [GH-589] was opened
https://github.com/doctrine/doctrine2/pull/589

Comment by Benjamin Eberlei [ 26/Feb/13 ]

A related Github Pull-Request [GH-589] was closed
https://github.com/doctrine/doctrine2/pull/589

Comment by Doctrine Bot [ 29/Apr/14 ]

A related Github Pull-Request [GH-589] was closed:
https://github.com/doctrine/dbal/pull/589

Comment by Doctrine Bot [ 12/Nov/14 ]

A related Github Pull-Request [GH-1172] was assigned:
https://github.com/doctrine/doctrine2/pull/1172





[DDC-2235] Single table inheritance discriminator in WHERE when using arbitrary join syntax Created: 11/Jan/13  Updated: 08/Nov/14  Resolved: 16/Aug/13

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

Type: Bug Priority: Major
Reporter: Jordi Forns Assignee: Guilherme Blanco
Resolution: Fixed Votes: 6
Labels: None

Issue Links:
Duplicate
duplicates DDC-1940 Doctrine DQL: erroneous sql generatio... Resolved

 Description   

The condition on the discriminator column is placed in the WHERE clause when using arbitrary join syntax, which renders LEFT JOINs useless.

Given these classes:
A - no inheritance
B1 - abstract, root of a hierarchy, discriminator column is named 'type'
I setup a query builder like this:

$qb->select('a.id AS idA, b.id AS idB')
    ->from('\Entity\A', 'a')
    ->leftJoin('\Entity\B1', 'b', \Doctrine\ORM\Query\Expr\Join::WITH, 'a.something=b.something');
And the SQL Doctrine generates is something like this:
SELECT a.id, b.id FROM a LEFT JOIN b ON (a.something=b.something) WHERE b.type IN ('1', '2', '3')

The problems is that the WHERE condition makes the left join useless.

The condition on the discriminator column should be placed in the JOIN clause to avoid the problem.



 Comments   
Comment by Ondrej Hlavaty [ 10/Feb/13 ]

Can this be somehow worked around? If not, it is really serious problem...

Comment by Jordi Forns [ 18/Feb/13 ]

I couldn't find any workaround.
Trying to force the 'type' condition in the join clause resulted useless as Doctrine would add the 'where' condition regardless.

Comment by Michel Salib [ 22/Mar/13 ]

Easier way to workaround right now, is to declare a OneToMany from class A to class B on a protected field (no need of getter or setter). That way you can do classic join via relationship transversing and then the condition will be placed in the ON part of the query.

Comment by Yuta Konishi [ 01/Apr/13 ]

I could access with below codes. You should use RAW SQL it is easy solution I guess. good luck.

$qb = $em->createQueryBuilder();

$qb->select('a, b')
->from('YourEntity1', 'a')
->leftJoin('YourEntity2', 'b', \Doctrine\ORM\Query\Expr\Join::WITH, 'a.id = b.relationId');

$raw_sql = $qb->where( 
	$qb->expr()->in('a.relationId', $ids)
)
->orderBy('a.updatedAt', 'DESC')
->setMaxResults(10)
->getQuery()->getSQL();

$conn = $em->getConnection();
$stmt = $conn->query($raw_sql);

/* $stmt->fetchAll(); // access as Array */
Comment by Benjamin Eberlei [ 04/Apr/13 ]

Assigned to Alexander

Comment by Benjamin Eberlei [ 14/Apr/13 ]

Duplicate of DDC-1940

Comment by Jordi Forns [ 22/Apr/13 ]

Benjamin: this bug doesn't seem to be a dupe of DDC-1940. Actually that issue doesn't seem to be a bug at all.

As a reminder, the problem in this issue is that when performing arbitrary left joins on entities that are part of a class hierarchy, the discriminator condition is placed in the where clause instead of the join clause. This means that rows that could not be joined will have null values in the discriminator column and thus will not be returned because of the where condition (which will contain something like " where x.discriminator in (1,2,3) ").

Comment by Tom Arnfeld [ 27/Apr/13 ]

Has this issue been resolved elsewhere? From reading over DDC-1940 it doesn't seem to be a duplicate at all. I'm experiencing the same problem as Jordi and can't seem to find a solution. Is there any particular reason the `IN ()` predicate is not a part of the join, but instead placed in the main `WHERE` clause?

Comment by Tom Arnfeld [ 28/Apr/13 ]

I've been looking into the root cause of this bug (or feature..) to try and understand why it's happening, and after trying various possible fixes (a little hard without full understanding of the Doctrine/Query internals) I've ended up with a fix that seems to work well for my use case, at least. I've not run any of the unit tests (I plan to, and may adjust my fix based on that) but the top revision is my change... https://gist.github.com/tarnfeld/a6bb50ec707c7af1c5dc/revisions

Would love some feedback.

Pull request here: https://github.com/doctrine/doctrine2/pull/656

Comment by Jordi Forns [ 29/Apr/13 ]

Tom's fix moves the condition of the discriminator column to the LEFT JOIN, which is exactly what was needed.

Alexander: could you please give it a look?

Comment by Jordi Forns [ 23/May/13 ]

Tom's proposal seems to fix the issue.

Comment by Gordon Forsythe [ 11/Jun/13 ]

Agree, Tom's pull request looks like it fixes the issue. Is there a reason this hasn't been merged yet?

Comment by Gordon Forsythe [ 24/Jun/13 ]

I believe this may have been fixed by #DDC-2506 but I haven't tested it yet.
There is a pull request for it https://github.com/doctrine/doctrine2/pull/708 and there has been recent activity.
Disregard, not related.

Comment by Tom Arnfeld [ 24/Jun/13 ]

The two don't seem to be at all related to me, or maybe i'm missing something? Also, this PR has been open for two months, with no sign of being merged :/

Comment by Doctrine Bot [ 13/Aug/13 ]

A related Github Pull-Request [GH-708] was closed:
https://github.com/doctrine/doctrine2/pull/708

Comment by Benjamin Eberlei [ 13/Aug/13 ]

Gordon Forsythe I don't like your tone. This is an open-source project and we do this in our free time. Please respect that we cannot offer specific response times at all.

Comment by Doctrine Bot [ 16/Aug/13 ]

A related Github Pull-Request [GH-656] was closed:
https://github.com/doctrine/doctrine2/pull/656

Comment by Marco Pivetta [ 16/Aug/13 ]

Fixed at https://github.com/doctrine/doctrine2/commit/605c32dbb384e25117625a7cb4db4e7319a16bae ( https://github.com/doctrine/doctrine2/pull/758 )

Comment by Benjamin Eberlei [ 20/Aug/13 ]

merged into 2.4

Comment by Doctrine Bot [ 09/Aug/14 ]

A related Github Pull-Request [GH-656] was closed:
https://github.com/doctrine/dbal/pull/656

Comment by Doctrine Bot [ 27/Oct/14 ]

A related Github Pull-Request [GH-708] was closed:
https://github.com/doctrine/dbal/pull/708

Comment by Doctrine Bot [ 08/Nov/14 ]

A related Github Pull-Request [GH-708] was assigned:
https://github.com/doctrine/dbal/pull/708





[DDC-2506] WITH Conditionals on Class Table Inheritance LEFT JOINs are inserted incorrectly Created: 14/Jun/13  Updated: 08/Nov/14  Resolved: 20/Aug/13

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

Type: Bug Priority: Major
Reporter: Matt Janssen Assignee: Benjamin Eberlei
Resolution: Fixed Votes: 2
Labels: dql, inheritance, joins, sql-walker


 Description   

The following JOIN

JOIN c.ctiRelationship cti WITH cti.id IN (42)

generates unexpected SQL

LEFT JOIN class_base p1_ ON u1_.cti_id = p1_.id 
LEFT JOIN class_child1 p2_ ON p1_.id = p2_.id
LEFT JOIN class_child2 p3_ ON p1_.id = p3_.id AND (p1_.id IN (42)) 

when it SHOULD be generating

LEFT JOIN class_base p1_ ON u1_.cti_id = p1_.id AND (p1_.id IN (42)) 
LEFT JOIN class_child1 p2_ ON p1_.id = p2_.id
LEFT JOIN class_child2 p3_ ON p1_.id = p3_.id


 Comments   
Comment by Matt Janssen [ 14/Jun/13 ]

https://github.com/doctrine/doctrine2/pull/708

Comment by gseric [ 01/Jul/13 ]

Thanks Matt, this bug prevented me to upgrade to 2.3. BTW it was originally reported in DDC-2131 (I put a comment there to redirect users here).

Comment by Gordon Forsythe [ 03/Jul/13 ]

I've tested this PR and it does work.

Comment by Doctrine Bot [ 13/Aug/13 ]

A related Github Pull-Request [GH-708] was closed:
https://github.com/doctrine/doctrine2/pull/708

Comment by Doctrine Bot [ 17/Feb/14 ]

A related Github Pull-Request [GH-886] was closed:
https://github.com/doctrine/doctrine2/pull/886

Comment by Doctrine Bot [ 27/Oct/14 ]

A related Github Pull-Request [GH-708] was closed:
https://github.com/doctrine/dbal/pull/708

Comment by Doctrine Bot [ 08/Nov/14 ]

A related Github Pull-Request [GH-708] was assigned:
https://github.com/doctrine/dbal/pull/708





[DDC-2548] [GH-720] Allow to have non-distinct queries Created: 09/Jul/13  Updated: 07/Nov/14  Resolved: 06/Aug/13

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

Type: Bug Priority: Major
Reporter: Doctrine Bot Assignee: Guilherme Blanco
Resolution: Fixed Votes: 0
Labels: None


 Description   

This issue is created automatically through a Github pull request on behalf of bakura10:

Url: https://github.com/doctrine/doctrine2/pull/720

Message:

The getHint method would return false if no hint was set for the given name. Therefore even if you set the CountWalker::HINT_DISTINCT to false, it would have been ignored and set to true by the paginator.



 Comments   
Comment by Doctrine Bot [ 06/Aug/13 ]

A related Github Pull-Request [GH-720] was closed:
https://github.com/doctrine/doctrine2/pull/720

Comment by Marco Pivetta [ 06/Aug/13 ]

Merged: https://github.com/doctrine/doctrine2/commit/354d7050dc83cab7315c95c3511f5cf8c2b567c5

Comment by Doctrine Bot [ 07/Nov/14 ]

A related Github Pull-Request [GH-720] was assigned:
https://github.com/doctrine/dbal/pull/720





[DDC-2533] [GH-710] Fix extra lazy get Created: 27/Jun/13  Updated: 05/Nov/14  Resolved: 30/Jun/13

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

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


 Description   

This issue is created automatically through a Github pull request on behalf of sandermarechal:

Url: https://github.com/doctrine/doctrine2/pull/710

Message:

I made a big mistake in PR #706, my apologies. The get() function in the OneToManyPersister and ManyToManyPersister did not add the collection owner to the load query.

The first commit in this PR fixes this for the OneToMayPersister.

I could not find a way to fix this for the ManyToManyPersister. Problem is that you can only use conditions on the owning side of a ManyToMany relation, not on the inverse side. Code like `load(array($mapping['inversedBy'] => $coll->getOwner()), ...)` gave an ORMException.

Therefor, the second commit in this PR removes the extra-lazy-get for ManyToMany relations. If anyone has any ideas how to make this work for the ManyToMany side, please let me know.



 Comments   
Comment by Doctrine Bot [ 30/Jun/13 ]

A related Github Pull-Request [GH-710] was closed:
https://github.com/doctrine/doctrine2/pull/710

Comment by Doctrine Bot [ 05/Nov/14 ]

A related Github Pull-Request [GH-710] was assigned:
https://github.com/doctrine/dbal/pull/710

Comment by Doctrine Bot [ 05/Nov/14 ]

A related Github Pull-Request [GH-710] was closed:
https://github.com/doctrine/dbal/pull/710





[DDC-2520] [GH-705] [DDC-2519] Partial association identifier Created: 20/Jun/13  Updated: 05/Nov/14  Resolved: 23/Jun/13

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

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


 Description   

This issue is created automatically through a Github pull request on behalf of FabioBatSilva:

Url: https://github.com/doctrine/doctrine2/pull/705

Message:

http://www.doctrine-project.org/jira/browse/DDC-2519



 Comments   
Comment by Doctrine Bot [ 23/Jun/13 ]

A related Github Pull-Request [GH-705] was closed:
https://github.com/doctrine/doctrine2/pull/705

Comment by Fabio B. Silva [ 23/Jun/13 ]

Merged : https://github.com/doctrine/doctrine2/commit/2ce72f38a2a13c665cd7e2ee5d79eb82d2c8003b

Comment by Doctrine Bot [ 05/Nov/14 ]

A related Github Pull-Request [GH-705] was assigned:
https://github.com/doctrine/dbal/pull/705

Comment by Doctrine Bot [ 05/Nov/14 ]

A related Github Pull-Request [GH-705] was closed:
https://github.com/doctrine/dbal/pull/705





[DDC-2518] [GH-704] added badges stable release and total downloads Created: 19/Jun/13  Updated: 05/Nov/14  Resolved: 19/Jun/13

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

Type: Documentation Priority: Major
Reporter: Doctrine Bot Assignee: Benjamin Eberlei
Resolution: Fixed Votes: 0
Labels: None


 Description   

This issue is created automatically through a Github pull request on behalf of liuggio:

Url: https://github.com/doctrine/doctrine2/pull/704

Message:

you can see the preview here: https://github.com/liuggio/doctrine2/tree/patch-1



 Comments   
Comment by Doctrine Bot [ 19/Jun/13 ]

A related Github Pull-Request [GH-704] was closed:
https://github.com/doctrine/doctrine2/pull/704

Comment by Marco Pivetta [ 19/Jun/13 ]

https://github.com/doctrine/doctrine2/commit/1382d766b09a04d504871bb50d519575ac553136

Comment by Doctrine Bot [ 05/Nov/14 ]

A related Github Pull-Request [GH-704] was assigned:
https://github.com/doctrine/dbal/pull/704





[DDC-2513] [GH-702] ANSI compliant quote strategy Created: 18/Jun/13  Updated: 05/Nov/14  Resolved: 23/Jun/13

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

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


 Description   

This issue is created automatically through a Github pull request on behalf of FabioBatSilva:

Url: https://github.com/doctrine/doctrine2/pull/702

Message:



 Comments   
Comment by Doctrine Bot [ 23/Jun/13 ]

A related Github Pull-Request [GH-702] was closed:
https://github.com/doctrine/doctrine2/pull/702

Comment by Fabio B. Silva [ 23/Jun/13 ]

Merged : https://github.com/doctrine/doctrine2/commit/457036aacb660b21196d4fce7de215a943cc52e8

Comment by Doctrine Bot [ 05/Nov/14 ]

A related Github Pull-Request [GH-702] was closed:
https://github.com/doctrine/dbal/pull/702





[DDC-2534] [GH-711] Coveralls code coverage Created: 28/Jun/13  Updated: 31/Oct/14  Resolved: 28/Jun/13

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

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


 Description   

This issue is created automatically through a Github pull request on behalf of FabioBatSilva:

Url: https://github.com/doctrine/doctrine2/pull/711

Message:

This patch adds support for https://coveralls.io



 Comments   
Comment by Doctrine Bot [ 28/Jun/13 ]

A related Github Pull-Request [GH-711] was closed:
https://github.com/doctrine/doctrine2/pull/711

Comment by Marco Pivetta [ 28/Jun/13 ]

Merged at https://github.com/doctrine/doctrine2/commit/8e1111c8d3f0281990ab4533aa42a6020c43abd0

Comment by Doctrine Bot [ 31/Oct/14 ]

A related Github Pull-Request [GH-711] was closed:
https://github.com/doctrine/dbal/pull/711





[DDC-2371] [GH-631] Fix typo in one of the orderBy examples. Created: 26/Mar/13  Updated: 26/Oct/14  Resolved: 08/Sep/13

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

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


 Description   

This issue is created automatically through a Github pull request on behalf of aaronmu:

Url: https://github.com/doctrine/doctrine2/pull/631

Message:

Fix typo in one of the orderBy examples.



 Comments   
Comment by Benjamin Eberlei [ 26/Mar/13 ]

A related Github Pull-Request [GH-631] was closed
https://github.com/doctrine/doctrine2/pull/631

Comment by Doctrine Bot [ 26/Oct/14 ]

A related Github Pull-Request [GH-631] was closed:
https://github.com/doctrine/dbal/pull/631





[DDC-2517] [GH-703] Clear visitedCollections Created: 19/Jun/13  Updated: 23/Oct/14  Resolved: 25/Jun/13

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

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


 Description   

This issue is created automatically through a Github pull request on behalf of shulcsm:

Url: https://github.com/doctrine/doctrine2/pull/703

Message:

Visited collections are cleared only in commit(). Commit clears up only if it actually has something to do. Processing large amounts of records without changing them cause visitedCollections to grow without any way of clearing.



 Comments   
Comment by Doctrine Bot [ 30/Jun/13 ]

A related Github Pull-Request [GH-703] was closed:
https://github.com/doctrine/doctrine2/pull/703

Comment by Doctrine Bot [ 23/Oct/14 ]

A related Github Pull-Request [GH-703] was assigned:
https://github.com/doctrine/dbal/pull/703





[DDC-2476] [GH-680] [wip] better reverse engineers the mapping metadata from a database Created: 29/May/13  Updated: 23/Oct/14  Resolved: 08/Sep/13

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

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


 Description   

This issue is created automatically through a Github pull request on behalf of bronze1man:

Url: https://github.com/doctrine/doctrine2/pull/680

Message:

  1. The problem:
    1.use symfony2 doctrine:mapping:import from msyql database to annotation
    2.use symfony2 doctrine:schema:update will see a lot of sql update about just import database schema.
    3.this PR fix eliminate some of those sql update...
  1. has fixed problem:
  • column default
  • column unsigned (add test)
  • column comment
  • column type decimal with precision and scale
  • table with simple index
  • table with unique index


 Comments   
Comment by Doctrine Bot [ 12/Jun/13 ]

A related Github Pull-Request [GH-680] was closed:
https://github.com/doctrine/doctrine2/pull/680

Comment by Guilherme Blanco [ 12/Jun/13 ]

Fixed: https://github.com/doctrine/doctrine2/commit/3d86c82a7fb51875d1b6c66b865134c9ccf1a878

Comment by Guilherme Blanco [ 12/Jun/13 ]

https://github.com/doctrine/doctrine2/commit/3d86c82a7fb51875d1b6c66b865134c9ccf1a878

Comment by Benjamin Eberlei [ 08/Sep/13 ]

Fix Version 2.4

Comment by Doctrine Bot [ 23/Oct/14 ]

A related Github Pull-Request [GH-680] was closed:
https://github.com/doctrine/dbal/pull/680

Comment by Doctrine Bot [ 23/Oct/14 ]

A related Github Pull-Request [GH-680] was assigned:
https://github.com/doctrine/dbal/pull/680





[DDC-2493] [GH-689] [WIP][DDC-1995 ] Support metadata class as parameter for instance of expression Created: 07/Jun/13  Updated: 22/Oct/14  Resolved: 07/Jun/13

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

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


 Description   

This issue is created automatically through a Github pull request on behalf of FabioBatSilva:

Url: https://github.com/doctrine/doctrine2/pull/689

Message:

Hi guys,

This is a possible solution for DDC-1995(http://www.doctrine-project.org/jira/browse/DDC-1995),

I've attempted some diferent ways to fix this problem without success.
Anyway, RSM still looks like the wrong place to parameters mapping.



 Comments   
Comment by Doctrine Bot [ 07/Jun/13 ]

A related Github Pull-Request [GH-689] was closed:
https://github.com/doctrine/doctrine2/pull/689

Comment by Fabio B. Silva [ 07/Jun/13 ]

Merged : https://github.com/doctrine/doctrine2/commit/462173ad71ae63cd9877e1e642f7968ed1f9971b

Comment by Doctrine Bot [ 22/Oct/14 ]

A related Github Pull-Request [GH-689] was assigned:
https://github.com/doctrine/dbal/pull/689

Comment by Doctrine Bot [ 22/Oct/14 ]

A related Github Pull-Request [GH-689] was closed:
https://github.com/doctrine/dbal/pull/689





[DDC-2492] [GH-688] Implement QuoteStrategy on SqlWalker walkRangeVariableDeclaration Created: 06/Jun/13  Updated: 22/Oct/14  Resolved: 12/Jun/13

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

Type: Bug Priority: Major
Reporter: Doctrine Bot Assignee: Guilherme Blanco
Resolution: Fixed Votes: 0
Labels: None


 Description   

This issue is created automatically through a Github pull request on behalf of johnbrown:

Url: https://github.com/doctrine/doctrine2/pull/688

Message:

Based on:
http://www.doctrine-project.org/jira/browse/DDC-1845
https://github.com/doctrine/doctrine2/commit/cb72219b118c158c9b5344c4b81ff2b1a9149ab0



 Comments   
Comment by Doctrine Bot [ 12/Jun/13 ]

A related Github Pull-Request [GH-688] was closed:
https://github.com/doctrine/doctrine2/pull/688

Comment by Marco Pivetta [ 12/Jun/13 ]

Merged at https://github.com/doctrine/doctrine2/commit/6ef48561baa6cd6e3da1304d7d815883be9a9af1

Comment by Doctrine Bot [ 22/Oct/14 ]

A related Github Pull-Request [GH-688] was closed:
https://github.com/doctrine/dbal/pull/688





[DDC-2499] [GH-691] IDENTITY function fix for Joined Inheritance Created: 12/Jun/13  Updated: 22/Oct/14  Resolved: 12/Jun/13

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

Type: Bug Priority: Major
Reporter: Doctrine Bot Assignee: Guilherme Blanco
Resolution: Fixed Votes: 0
Labels: None


 Description   

This issue is created automatically through a Github pull request on behalf of 51systems:

Url: https://github.com/doctrine/doctrine2/pull/691

Message:

In a joined inheritance scenario, the identity function implementation assumed the foreign key column was on the table corresponding to the (sub)class named in the select statement. If the relation was on a super-class incorrect sql was generated.



 Comments   
Comment by Doctrine Bot [ 12/Jun/13 ]

A related Github Pull-Request [GH-691] was closed:
https://github.com/doctrine/doctrine2/pull/691

Comment by Marco Pivetta [ 12/Jun/13 ]

Merged at https://github.com/doctrine/doctrine2/commit/0248f743babbd9b8861ff744a25f006ce2b83f9d

Comment by Doctrine Bot [ 21/Oct/14 ]

A related Github Pull-Request [GH-691] was assigned:
https://github.com/doctrine/dbal/pull/691

Comment by Doctrine Bot [ 22/Oct/14 ]

A related Github Pull-Request [GH-691] was closed:
https://github.com/doctrine/dbal/pull/691





[DDC-2505] [GH-697] Fix phpDoc syntax in ClassMetadataInfo.php Created: 14/Jun/13  Updated: 20/Oct/14  Resolved: 25/Jun/13

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

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


 Description   

This issue is created automatically through a Github pull request on behalf of michaelperrin:

Url: https://github.com/doctrine/doctrine2/pull/697

Message:



 Comments   
Comment by Doctrine Bot [ 14/Jun/13 ]

A related Github Pull-Request [GH-697] was closed:
https://github.com/doctrine/doctrine2/pull/697

Comment by Doctrine Bot [ 19/Oct/14 ]

A related Github Pull-Request [GH-697] was assigned:
https://github.com/doctrine/dbal/pull/697

Comment by Doctrine Bot [ 20/Oct/14 ]

A related Github Pull-Request [GH-697] was closed:
https://github.com/doctrine/dbal/pull/697





[DDC-2277] [GH-570] Deprecation of PEAR/GIT/TAR autoloading Created: 04/Feb/13  Updated: 19/Oct/14  Resolved: 14/Feb/13

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

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


 Description   

This issue is created automatically through a Github pull request on behalf of Ocramius:

Url: https://github.com/doctrine/doctrine2/pull/570

Message:

Updates the test suite to use composer based autoloading



 Comments   
Comment by Benjamin Eberlei [ 14/Feb/13 ]

A related Github Pull-Request [GH-570] was closed
https://github.com/doctrine/doctrine2/pull/570

Comment by Marco Pivetta [ 14/Feb/13 ]

Merged

Comment by Doctrine Bot [ 19/Oct/14 ]

A related Github Pull-Request [GH-570] was assigned:
https://github.com/doctrine/dbal/pull/570

Comment by Doctrine Bot [ 19/Oct/14 ]

A related Github Pull-Request [GH-570] was closed:
https://github.com/doctrine/dbal/pull/570





[DDC-2356] [GH-619] [DDC-2090] Fix MultiTableUpdateExecutor with query cache Created: 17/Mar/13  Updated: 19/Oct/14  Resolved: 17/Mar/13

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

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


 Description   

This issue is created automatically through a Github pull request on behalf of FabioBatSilva:

Url: https://github.com/doctrine/doctrine2/pull/619

Message:

http://www.doctrine-project.org/jira/browse/DDC-2090



 Comments   
Comment by Benjamin Eberlei [ 17/Mar/13 ]

A related Github Pull-Request [GH-619] was closed
https://github.com/doctrine/doctrine2/pull/619

Comment by Fabio B. Silva [ 17/Mar/13 ]

Merged : https://github.com/doctrine/doctrine2/commit/60b8bc63a1a4819cf112cfbbc7cca06b5792aba6

Comment by Doctrine Bot [ 21/Aug/14 ]

A related Github Pull-Request [GH-619] was closed:
https://github.com/doctrine/dbal/pull/619

Comment by Doctrine Bot [ 19/Oct/14 ]

A related Github Pull-Request [GH-619] was assigned:
https://github.com/doctrine/dbal/pull/619





[DDC-2446] [GH-666] [DDC-2429] Fix xsd definition Created: 13/May/13  Updated: 19/Oct/14  Resolved: 26/May/13

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

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


 Description   

This issue is created automatically through a Github pull request on behalf of FabioBatSilva:

Url: https://github.com/doctrine/doctrine2/pull/666

Message:

http://www.doctrine-project.org/jira/browse/DDC-2429



 Comments   
Comment by Doctrine Bot [ 26/May/13 ]

A related Github Pull-Request [GH-666] was closed:
https://github.com/doctrine/doctrine2/pull/666

Comment by Doctrine Bot [ 21/Aug/14 ]

A related Github Pull-Request [GH-666] was closed:
https://github.com/doctrine/dbal/pull/666

Comment by Doctrine Bot [ 19/Oct/14 ]

A related Github Pull-Request [GH-666] was assigned:
https://github.com/doctrine/dbal/pull/666





[DDC-2456] [GH-669] Fixed generating column names for self referencing entity. Created: 17/May/13  Updated: 19/Oct/14  Resolved: 26/May/13

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

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


 Description   

This issue is created automatically through a Github pull request on behalf of hason:

Url: https://github.com/doctrine/doctrine2/pull/669

Message:



 Comments   
Comment by Doctrine Bot [ 26/May/13 ]

A related Github Pull-Request [GH-669] was closed:
https://github.com/doctrine/doctrine2/pull/669

Comment by Doctrine Bot [ 19/Oct/14 ]

A related Github Pull-Request [GH-669] was assigned:
https://github.com/doctrine/dbal/pull/669





[DDC-2458] [GH-671] [DDC-2435] Fix column name with numbers and non alphanumeric characters. Created: 17/May/13  Updated: 19/Oct/14  Resolved: 17/May/13

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

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


 Description   

This issue is created automatically through a Github pull request on behalf of FabioBatSilva:

Url: https://github.com/doctrine/doctrine2/pull/671

Message:

http://www.doctrine-project.org/jira/browse/DDC-2435



 Comments   
Comment by Doctrine Bot [ 17/May/13 ]

A related Github Pull-Request [GH-671] was closed:
https://github.com/doctrine/doctrine2/pull/671

Comment by Fabio B. Silva [ 17/May/13 ]

Merged : https://github.com/doctrine/doctrine2/commit/c9d9b68fa9937218aad05dfca4b3f96b409cfc8e

Comment by Doctrine Bot [ 29/Aug/14 ]

A related Github Pull-Request [GH-671] was closed:
https://github.com/doctrine/dbal/pull/671

Comment by Doctrine Bot [ 19/Oct/14 ]

A related Github Pull-Request [GH-671] was assigned:
https://github.com/doctrine/dbal/pull/671





[DDC-2503] [GH-695] Implemented support for RepositoryFactory. Created: 14/Jun/13  Updated: 19/Oct/14  Resolved: 18/Jun/13

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

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


 Description   

This issue is created automatically through a Github pull request on behalf of guilhermeblanco:

Url: https://github.com/doctrine/doctrine2/pull/695

Message:

This allows anyone to override the default behavior to load Repositories.



 Comments   
Comment by Doctrine Bot [ 14/Jun/13 ]

A related Github Pull-Request [GH-695] was closed:
https://github.com/doctrine/doctrine2/pull/695

Comment by Fabio B. Silva [ 18/Jun/13 ]

Merged : https://github.com/doctrine/doctrine2/commit/7903a2b5139e51b5dd7ed5ae164f7e0f3685dea7

Comment by Doctrine Bot [ 19/Oct/14 ]

A related Github Pull-Request [GH-695] was assigned:
https://github.com/doctrine/dbal/pull/695





[DDC-2491] [GH-687] Fixed rendering Created: 06/Jun/13  Updated: 19/Oct/14  Resolved: 06/Jun/13

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

Type: Documentation Priority: Major
Reporter: Doctrine Bot Assignee: Marco Pivetta
Resolution: Fixed Votes: 0
Labels: None


 Description   

This issue is created automatically through a Github pull request on behalf of mnapoli:

Url: https://github.com/doctrine/doctrine2/pull/687

Message:

Fixed some broken rendering on http://docs.doctrine-project.org/en/latest/reference/yaml-mapping.html



 Comments   
Comment by Doctrine Bot [ 06/Jun/13 ]

A related Github Pull-Request [GH-687] was closed:
https://github.com/doctrine/doctrine2/pull/687

Comment by Marco Pivetta [ 06/Jun/13 ]

Merged at https://github.com/doctrine/doctrine2/commit/5c7b98b2a990a1d7a6140e2c875f5ab6c3dc6f9f

Comment by Doctrine Bot [ 19/Oct/14 ]

A related Github Pull-Request [GH-687] was assigned:
https://github.com/doctrine/dbal/pull/687

Comment by Doctrine Bot [ 19/Oct/14 ]

A related Github Pull-Request [GH-687] was closed:
https://github.com/doctrine/dbal/pull/687





[DDC-2498] [GH-690] [DDC-2494] Apply type conversion to meta columns Created: 11/Jun/13  Updated: 16/Oct/14  Resolved: 12/Jun/13

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

Type: Bug Priority: Major
Reporter: Doctrine Bot Assignee: Guilherme Blanco
Resolution: Fixed Votes: 0
Labels: None


 Description   

This issue is created automatically through a Github pull request on behalf of FabioBatSilva:

Url: https://github.com/doctrine/doctrine2/pull/690

Message:

http://www.doctrine-project.org/jira/browse/DDC-2494



 Comments   
Comment by Doctrine Bot [ 12/Jun/13 ]

A related Github Pull-Request [GH-690] was closed:
https://github.com/doctrine/doctrine2/pull/690

Comment by Marco Pivetta [ 12/Jun/13 ]

Merged at https://github.com/doctrine/doctrine2/commit/6937061b23ec4de63081efac800415e09dcbcb4f

Comment by Doctrine Bot [ 14/Jul/14 ]

A related Github Pull-Request [GH-1073] was closed:
https://github.com/doctrine/doctrine2/pull/1073

Comment by Doctrine Bot [ 16/Oct/14 ]

A related Github Pull-Request [GH-690] was assigned:
https://github.com/doctrine/dbal/pull/690

Comment by Doctrine Bot [ 16/Oct/14 ]

A related Github Pull-Request [GH-690] was closed:
https://github.com/doctrine/dbal/pull/690





[DDC-2358] [GH-621] [doc] adding some more doc and examples for lifecycle event listeners and subscribers Created: 19/Mar/13  Updated: 14/Oct/14  Resolved: 06/Apr/13

Status: Closed
Project: Doctrine 2 - ORM
Component/s: None
Affects Version/s: None
Fix Version/s: 2.4

Type: Documentation Priority: Major
Reporter: Benjamin Eberlei Assignee: Guilherme Blanco
Resolution: Fixed Votes: 0
Labels: None


 Description   

This issue is created automatically through a Github pull request on behalf of dbu:

Url: https://github.com/doctrine/doctrine2/pull/621

Message:

as requested in https://github.com/symfony/symfony-docs/pull/2301



 Comments   
Comment by Doctrine Bot [ 20/Jun/14 ]

A related Github Pull-Request [GH-621] was closed:
https://github.com/doctrine/dbal/pull/621





[DDC-717] Do not use files when using proxy autogeneration Created: 22/Jul/10  Updated: 13/Oct/14  Resolved: 20/Aug/13

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

Type: Improvement Priority: Major
Reporter: Jaka Jancar Assignee: Benjamin Eberlei
Resolution: Fixed Votes: 2
Labels: None

Issue Links:
Reference
is referenced by DDC-2210 PHP warning in ProxyFactory when rena... Resolved

 Description   

Proxy classes are generated in less than 1ms for me. I prefer to not have a "build" step to reducing loading time by a milisecond, so I use autogenerate.

For users like me, wouldn't it be nicer if we wouldn't even have to configure a proxy dir and those files were never written (since they're not read more than once anyway)?



 Comments   
Comment by Jaka Jancar [ 22/Jul/10 ]

This very minimal patch removes the use of these temporary files:

--- library/Doctrine/ORM/Proxy/ProxyFactory.php	(revision 2)
+++ library/Doctrine/ORM/Proxy/ProxyFactory.php	(working copy)
@@ -78,9 +78,8 @@
         $fqn = $this->_proxyNamespace . '\\' . $proxyClassName;
 
         if ($this->_autoGenerate && ! class_exists($fqn, false)) {
-            $fileName = $this->_proxyDir . DIRECTORY_SEPARATOR . $proxyClassName . '.php';
-            $this->_generateProxyClass($this->_em->getClassMetadata($className), $proxyClassName, $fileName, self::$_proxyClassTemplate);
-            require $fileName;
+            $file = $this->_generateProxyClass($this->_em->getClassMetadata($className), $proxyClassName, null, self::$_proxyClassTemplate);
+            eval('?>'.$file);
         }
 
         if ( ! $this->_em->getMetadataFactory()->hasMetadataFor($fqn)) {
@@ -144,6 +143,9 @@
 
         $file = str_replace($placeholders, $replacements, $file);
 
+        if ($fileName === null)
+            return $file;
+
         file_put_contents($fileName, $file);
     }
 
Comment by Benjamin Eberlei [ 23/Jul/10 ]

The proxy dir is used for the "doctrine orm:generate-proxies" command in the case of "autogenerate= false", so you need to define it anyways.

You have to use proxies, the option is not for Proxy yes/no. If you have autogenerate=false and doctrine requires a proxy for a use case but can't find it you will get a fatal error.

Comment by Benjamin Eberlei [ 23/Jul/10 ]

I just saw the eval() keyword, ieeks It could maybe be a convenience option for those that don't want to use proxy direcotiries, however i am not sure.

Comment by Jaka Jancar [ 23/Jul/10 ]

eval() is no different than writing code to a file and using require().

When using runtime-generated proxies, there are no benefits (that I know of) from writing them to a file. The disadvantages are:

  • slower because of write disk access
  • has problems with high concurrency, unless special care is taken (DDC-716)
  • potentially has permission problems if code is executed by different users (e.g. nobody for a daemon and www-data for http)
  • requires setup of a writable directory

This is a nicer patch, which makes _generateProxyClass() return a string, just like other _generate* methods:

--- library/Doctrine/ORM/Proxy/ProxyFactory.php	(revision 2)
+++ library/Doctrine/ORM/Proxy/ProxyFactory.php	(working copy)
@@ -78,9 +78,8 @@
         $fqn = $this->_proxyNamespace . '\\' . $proxyClassName;
 
         if ($this->_autoGenerate && ! class_exists($fqn, false)) {
-            $fileName = $this->_proxyDir . DIRECTORY_SEPARATOR . $proxyClassName . '.php';
-            $this->_generateProxyClass($this->_em->getClassMetadata($className), $proxyClassName, $fileName, self::$_proxyClassTemplate);
-            require $fileName;
+            $code = $this->_generateProxyClass($this->_em->getClassMetadata($className), $proxyClassName);
+            eval($code);
         }
 
         if ( ! $this->_em->getMetadataFactory()->hasMetadataFor($fqn)) {
@@ -107,19 +106,19 @@
         foreach ($classes as $class) {
             $proxyClassName = str_replace('\\', '', $class->name) . 'Proxy';
             $proxyFileName = $proxyDir . $proxyClassName . '.php';
-            $this->_generateProxyClass($class, $proxyClassName, $proxyFileName, self::$_proxyClassTemplate);
+            $code = $this->_generateProxyClass($class, $proxyClassName);
+            file_put_contents($proxyFileName, "<?php\n" . $code);
         }
     }
 
     /**
      * Generates a proxy class file.
      *
-     * @param $class
-     * @param $originalClassName
+     * @param ClassMetadata $class
      * @param $proxyClassName
-     * @param $file The path of the file to write to.
+     * @return string The code of the generated methods.
      */
-    private function _generateProxyClass($class, $proxyClassName, $fileName, $file)
+    private function _generateProxyClass(ClassMetadata $class, $proxyClassName)
     {
         $methods = $this->_generateMethods($class);
         $sleepImpl = $this->_generateSleep($class);
@@ -142,9 +141,9 @@
             $methods, $sleepImpl
         );
 
-        $file = str_replace($placeholders, $replacements, $file);
+        $file = str_replace($placeholders, $replacements, self::$_proxyClassTemplate);
 
-        file_put_contents($fileName, $file);
+        return $file;
     }
 
     /**
@@ -244,8 +243,7 @@
 
     /** Proxy class code template */
     private static $_proxyClassTemplate =
-'<?php
-
+'
 namespace <namespace>;
 
 /**
Comment by Benjamin Eberlei [ 24/Jul/10 ]

Scheduled usage of eval() for 2.1, if the following conditions exist:

1. Autogenerate is set to TRUE
2. No Proxy Directory is configured.

Comment by Jaka Jancar [ 24/Jul/10 ]

Great, this is even better. This way you can have 1) autogenerated in ram-only, 2) autogenerated in files and 3) pregenerated.

And the minimal amount of config needed to get up and running is reduced, which is always nice.

Comment by Benjamin Eberlei [ 24/Jul/10 ]

you should know though, eval is dead slow. It generates the necessary proxies on EACH request and that cannot be cached in APC.

Comment by Jaka Jancar [ 24/Jul/10 ]

It's no slower than current autogeneration (file_put_contents+require). TBH, I don't know why anyone would want to use that over eval(), but I don't mind it being there.

Pre-generation is, of course, a different thing. Seems like a valid tradeoff to offer: build/a bit of config/better perfomance vs. no build/no config/potentially slower.

Comment by Benjamin Eberlei [ 24/Jul/10 ]

Yes, that is because file_put_contents + require is a development only strategy. The manual clearly states that autogenerate has to be false in production.

Comment by Roman S. Borschel [ 12/Aug/10 ]

Using eval() instead of producing and requiring the file in the case of enabled auto-generation of proxy classes sounds like a good improvement for 2.1 to make proxies more transparent during deveopment and for anyone for whom performance is no issue.

I'm increasing the priority as I think it is easy to implement for 2.1 and a good enhancement.

Comment by Karsten Dambekalns [ 09/Feb/11 ]

A note on why having the proxies written to a file can be useful even with autogenerate being on: it makes it really easy to check the proxy code being generated. I use that a lot currently.

The solution suggested, giving three possibilities is cool, though.





[DDC-2474] [GH-679] Fix getting started doc to work with current version Created: 28/May/13  Updated: 17/Sep/14  Resolved: 28/May/13

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

Type: Documentation Priority: Major
Reporter: Doctrine Bot Assignee: Marco Pivetta
Resolution: Fixed Votes: 0
Labels: None


 Description   

This issue is created automatically through a Github pull request on behalf of ajgarlag:

Url: https://github.com/doctrine/doctrine2/pull/679

Message:

The `cli-config.php` example provided at the getting started tutorial does not work with doctrine 2.4.



 Comments   
Comment by Doctrine Bot [ 28/May/13 ]

A related Github Pull-Request [GH-679] was closed:
https://github.com/doctrine/doctrine2/pull/679

Comment by Marco Pivetta [ 28/May/13 ]

Merged at https://github.com/doctrine/doctrine2/commit/4e8b787d072fe48e798a1bd5cd05f08e9a083525

Comment by Doctrine Bot [ 17/Sep/14 ]

A related Github Pull-Request [GH-679] was assigned:
https://github.com/doctrine/dbal/pull/679

Comment by Doctrine Bot [ 17/Sep/14 ]

A related Github Pull-Request [GH-679] was closed:
https://github.com/doctrine/dbal/pull/679





[DDC-2233] [GH-548] Fix for DDC-2203 Created: 10/Jan/13  Updated: 17/Sep/14  Resolved: 10/Jan/13

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

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


 Description   

This issue is created automatically through a Github pull request on behalf of nemekzg:

Url: https://github.com/doctrine/doctrine2/pull/548

Message:

Introduces the isEnabled method as proposed in DDC-2203



 Comments   
Comment by Benjamin Eberlei [ 10/Jan/13 ]

A related Github Pull-Request [GH-548] was closed
https://github.com/doctrine/doctrine2/pull/548

Comment by Doctrine Bot [ 17/Sep/14 ]

A related Github Pull-Request [GH-548] was closed:
https://github.com/doctrine/dbal/pull/548





[DDC-2473] [GH-678] Fix an instance of doubled words in the docs Created: 27/May/13  Updated: 17/Sep/14  Resolved: 27/May/13

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

Type: Documentation Priority: Minor
Reporter: Doctrine Bot Assignee: Marco Pivetta
Resolution: Fixed Votes: 0
Labels: None


 Description   

This issue is created automatically through a Github pull request on behalf of jbafford:

Url: https://github.com/doctrine/doctrine2/pull/678

Message:



 Comments   
Comment by Doctrine Bot [ 27/May/13 ]

A related Github Pull-Request [GH-678] was closed:
https://github.com/doctrine/doctrine2/pull/678

Comment by Marco Pivetta [ 27/May/13 ]

merged

Comment by Doctrine Bot [ 17/Sep/14 ]

A related Github Pull-Request [GH-678] was assigned:
https://github.com/doctrine/dbal/pull/678

Comment by Doctrine Bot [ 17/Sep/14 ]

A related Github Pull-Request [GH-678] was closed:
https://github.com/doctrine/dbal/pull/678





[DDC-2209] [GH-540] [DDC-2208] Fix DDC-2208 Created: 20/Dec/12  Updated: 11/Sep/14  Resolved: 22/Dec/12

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

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


 Description   

This issue is created automatically through a Github pull request on behalf of FabioBatSilva:

Url: https://github.com/doctrine/doctrine2/pull/540

Message:

This patch fix DDC-2208

http://www.doctrine-project.org/jira/browse/DDC-2208



 Comments   
Comment by Benjamin Eberlei [ 22/Dec/12 ]

A related Github Pull-Request [GH-540] was closed
https://github.com/doctrine/doctrine2/pull/540

Comment by Doctrine Bot [ 11/Sep/14 ]

A related Github Pull-Request [GH-540] was closed:
https://github.com/doctrine/dbal/pull/540

Comment by Doctrine Bot [ 11/Sep/14 ]

A related Github Pull-Request [GH-540] was assigned:
https://github.com/doctrine/dbal/pull/540





[DDC-2060] [GH-465] Fixed a typo in ConcatFunction Created: 08/Oct/12  Updated: 10/Sep/14  Resolved: 25/Oct/12

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

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


 Description   

This issue is created automatically through a Github pull request on behalf of yohang:

Url: https://github.com/doctrine/doctrine2/pull/465

Message:



 Comments   
Comment by Benjamin Eberlei [ 08/Oct/12 ]

A related Github Pull-Request [GH-465] was closed
https://github.com/doctrine/doctrine2/pull/465

Comment by Fabio B. Silva [ 25/Oct/12 ]

Merged : https://github.com/doctrine/doctrine2/commit/65fabc20c9e807c7b5f86741d60d4a0cecab7ebc

Comment by Doctrine Bot [ 10/Sep/14 ]

A related Github Pull-Request [GH-465] was assigned:
https://github.com/doctrine/dbal/pull/465





[DDC-2460] [GH-672] Simplification example Created: 17/May/13  Updated: 10/Sep/14  Resolved: 26/May/13

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

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


 Description   

This issue is created automatically through a Github pull request on behalf of hell0w0rd:

Url: https://github.com/doctrine/doctrine2/pull/672

Message:

Remove doctrine class loader, one bootstrap file



 Comments   
Comment by Doctrine Bot [ 26/May/13 ]

A related Github Pull-Request [GH-672] was closed:
https://github.com/doctrine/doctrine2/pull/672

Comment by Doctrine Bot [ 10/Sep/14 ]

A related Github Pull-Request [GH-672] was closed:
https://github.com/doctrine/dbal/pull/672





[DDC-2461] [GH-673] Namespace based command names Created: 17/May/13  Updated: 02/Sep/14  Resolved: 26/May/13

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

Type: Bug Priority: Major
Reporter: Doctrine Bot Assignee: Marco Pivetta
Resolution: Fixed Votes: 0
Labels: None


 Description   

This issue is created automatically through a Github pull request on behalf of hell0w0rd:

Url: https://github.com/doctrine/doctrine2/pull/673

Message:

Symfony console supports auto completion:
``orm:generate:entities`` could called ``o:g:e``



 Comments   
Comment by Doctrine Bot [ 17/May/13 ]

A related Github Pull-Request [GH-673] was closed:
https://github.com/doctrine/doctrine2/pull/673

Comment by Marco Pivetta [ 17/May/13 ]

BC break without advantages

Comment by Doctrine Bot [ 17/May/13 ]

A related Github Pull-Request [GH-673] was reopened:
https://github.com/doctrine/doctrine2/pull/673

Comment by Doctrine Bot [ 26/May/13 ]

A related Github Pull-Request [GH-673] was closed:
https://github.com/doctrine/doctrine2/pull/673

Comment by Doctrine Bot [ 02/Sep/14 ]

A related Github Pull-Request [GH-673] was closed:
https://github.com/doctrine/dbal/pull/673

Comment by Doctrine Bot [ 02/Sep/14 ]

A related Github Pull-Request [GH-673] was assigned:
https://github.com/doctrine/dbal/pull/673





[DDC-2457] [GH-670] [DDC-2451] Fix entity listeners serialization Created: 17/May/13  Updated: 28/Aug/14  Resolved: 17/May/13

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

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


 Description   

This issue is created automatically through a Github pull request on behalf of FabioBatSilva:

Url: https://github.com/doctrine/doctrine2/pull/670

Message:

http://www.doctrine-project.org/jira/browse/DDC-2451



 Comments   
Comment by Doctrine Bot [ 17/May/13 ]

A related Github Pull-Request [GH-670] was closed:
https://github.com/doctrine/doctrine2/pull/670

Comment by Fabio B. Silva [ 17/May/13 ]

merged : https://github.com/doctrine/doctrine2/commit/65886fdfeaf38692be5196a59530f56fc3e6ab56

Comment by Doctrine Bot [ 28/Aug/14 ]

A related Github Pull-Request [GH-670] was assigned:
https://github.com/doctrine/dbal/pull/670





[DDC-2355] [GH-618] [DDC-2188] Fix arithmetic priority Created: 16/Mar/13  Updated: 21/Aug/14  Resolved: 06/Apr/13

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

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


 Description   

This issue is created automatically through a Github pull request on behalf of FabioBatSilva:

Url: https://github.com/doctrine/doctrine2/pull/618

Message:

Hi guys,

This patch fix DDC-2188(http://www.doctrine-project.org/jira/browse/DDC-2188),
Not sure if it could be considered a BC break.

Cheers



 Comments   
Comment by Doctrine Bot [ 16/Jun/14 ]

A related Github Pull-Request [GH-618] was closed:
https://github.com/doctrine/dbal/pull/618

Comment by Doctrine Bot [ 21/Aug/14 ]

A related Github Pull-Request [GH-618] was closed:
https://github.com/doctrine/dbal/pull/618





[DDC-2442] [GH-663] Adding failing test to demonstrate DDC-2432 Created: 09/May/13  Updated: 20/Aug/14  Resolved: 10/May/13

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

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


 Description   

This issue is created automatically through a Github pull request on behalf of Ocramius:

Url: https://github.com/doctrine/doctrine2/pull/663

Message:

Attempt to fix DDC-2432 ( http://www.doctrine-project.org/jira/browse/DDC-2432 )

Loading proxies with invalid identifiers will currently mark them as initialized regardless of the failure



 Comments   
Comment by Doctrine Bot [ 09/May/13 ]

A related Github Pull-Request [GH-663] was closed:
https://github.com/doctrine/doctrine2/pull/663

Comment by Doctrine Bot [ 20/Aug/14 ]

A related Github Pull-Request [GH-663] was closed:
https://github.com/doctrine/dbal/pull/663





[DDC-2392] [GH-644] Fixed typos Created: 06/Apr/13  Updated: 20/Aug/14  Resolved: 06/Apr/13

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

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


 Description   

This issue is created automatically through a Github pull request on behalf of pborreli:

Url: https://github.com/doctrine/doctrine2/pull/644

Message:



 Comments   
Comment by Doctrine Bot [ 20/Aug/14 ]

A related Github Pull-Request [GH-644] was closed:
https://github.com/doctrine/dbal/pull/644

Comment by Doctrine Bot [ 20/Aug/14 ]

A related Github Pull-Request [GH-644] was assigned:
https://github.com/doctrine/dbal/pull/644





[DDC-2439] [GH-662] Fixed a code block. Created: 09/May/13  Updated: 19/Aug/14  Resolved: 09/May/13

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

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


 Description   

This issue is created automatically through a Github pull request on behalf of jakzal:

Url: https://github.com/doctrine/doctrine2/pull/662

Message:

Last code block in the [Keeping your Modules independent](http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/cookbook/resolve-target-entity-listener.html) cookbook is broken.

Sphinx does not like the way code was indented. Building the documentation raises the following error:

en/cookbook/resolve-target-entity-listener.rst:121: ERROR: Unexpected indentation.



 Comments   
Comment by Doctrine Bot [ 09/May/13 ]

A related Github Pull-Request [GH-662] was closed:
https://github.com/doctrine/doctrine2/pull/662

Comment by Doctrine Bot [ 19/Aug/14 ]

A related Github Pull-Request [GH-662] was closed:
https://github.com/doctrine/dbal/pull/662

Comment by Doctrine Bot [ 19/Aug/14 ]

A related Github Pull-Request [GH-662] was assigned:
https://github.com/doctrine/dbal/pull/662





[DDC-2438] [GH-661] Update annotations-reference.rst Created: 09/May/13  Updated: 15/Aug/14  Resolved: 09/May/13

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

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


 Description   

This issue is created automatically through a Github pull request on behalf of HarmenM:

Url: https://github.com/doctrine/doctrine2/pull/661

Message:

Added missing @JoinColumns in the index



 Comments   
Comment by Doctrine Bot [ 09/May/13 ]

A related Github Pull-Request [GH-661] was closed:
https://github.com/doctrine/doctrine2/pull/661

Comment by Doctrine Bot [ 15/Aug/14 ]

A related Github Pull-Request [GH-661] was closed:
https://github.com/doctrine/dbal/pull/661

Comment by Doctrine Bot [ 15/Aug/14 ]

A related Github Pull-Request [GH-661] was assigned:
https://github.com/doctrine/dbal/pull/661





[DDC-2614] [GH-758] Fixed DDC-2235. Created: 16/Aug/13  Updated: 09/Aug/14  Resolved: 16/Aug/13

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

Type: Bug Priority: Major
Reporter: Doctrine Bot Assignee: Marco Pivetta
Resolution: Duplicate Votes: 0
Labels: None


 Description   

This issue is created automatically through a Github pull request on behalf of guilhermeblanco:

Url: https://github.com/doctrine/doctrine2/pull/758

Message:

Replaces #656



 Comments   
Comment by Doctrine Bot [ 16/Aug/13 ]

A related Github Pull-Request [GH-656] was closed:
https://github.com/doctrine/doctrine2/pull/656

Comment by Doctrine Bot [ 16/Aug/13 ]

A related Github Pull-Request [GH-758] was closed:
https://github.com/doctrine/doctrine2/pull/758

Comment by Marco Pivetta [ 16/Aug/13 ]

Duplicate of DDC-2235

Comment by Doctrine Bot [ 09/Aug/14 ]

A related Github Pull-Request [GH-656] was closed:
https://github.com/doctrine/dbal/pull/656





[DDC-2420] [GH-656] [DDC-2235] Fix for using a LEFT JOIN onto an entity with single table inheritance Created: 28/Apr/13  Updated: 09/Aug/14  Resolved: 16/Aug/13

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

Type: Bug Priority: Major
Reporter: Doctrine Bot Assignee: Marco Pivetta
Resolution: Incomplete Votes: 0
Labels: None


 Description   

This issue is created automatically through a Github pull request on behalf of tarnfeld:

Url: https://github.com/doctrine/doctrine2/pull/656

Message:

Possible fix for the bug DDC-2235. I'd love to hear some opinions on whether this is the right way to go about this issue. I'm not particularly familiar with the internals of doctrine so there may be a better solution.

------

The issue is when using DQL to perform a left join on an entity using single
table inheritance, doctrine tries to insert an `IN()` predicate into the `WHERE`
clause for all of the discriminator values. That makes sense and is valid, so
it would be wrong to remove that behaviour.

However when using a left join having an `IN()` in the main where clause makes
the `LEFT JOIN` pretty much useless, as it implicitly creates a `WHERE NOT NULL`
clause. This commit attempts to fix that by including an `OR IS NULL` in the
query if the join is a `LEFT JOIN`.

I've added some regression tests to ensure this bug never creeps back in. They fail on master (highlighting the bug) and pass after these commits have been applied. I've also included a couple of other queries as tests to be sure only this one case has been affected.



 Comments   
Comment by Doctrine Bot [ 16/Aug/13 ]

A related Github Pull-Request [GH-656] was closed:
https://github.com/doctrine/doctrine2/pull/656

Comment by Doctrine Bot [ 16/Aug/13 ]

A related Github Pull-Request [GH-758] was closed:
https://github.com/doctrine/doctrine2/pull/758

Comment by Marco Pivetta [ 16/Aug/13 ]

Handled in https://github.com/doctrine/doctrine2/pull/758 ( DDC-2235 )

Comment by Doctrine Bot [ 09/Aug/14 ]

A related Github Pull-Request [GH-656] was closed:
https://github.com/doctrine/dbal/pull/656





[DDC-2377] [GH-636] Fixed typos in documentation. Created: 28/Mar/13  Updated: 08/Aug/14  Resolved: 08/Sep/13

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

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


 Description   

This issue is created automatically through a Github pull request on behalf of dustinmoorman:

Url: https://github.com/doctrine/doctrine2/pull/636

Message:

Hello again everyone! I went ahead and fixed the rest of the instances in the documentation that used 'an SQL'. I also fixed an instance of 'a alias' to be 'an alias', which is proper since alias begins with a vowel.



 Comments   
Comment by Benjamin Eberlei [ 28/Mar/13 ]

A related Github Pull-Request [GH-636] was closed
https://github.com/doctrine/doctrine2/pull/636

Comment by Doctrine Bot [ 08/Aug/14 ]

A related Github Pull-Request [GH-636] was closed:
https://github.com/doctrine/dbal/pull/636





[DDC-2419] [GH-655] [DDC-2409] Fix merge association UnitOfWork::STATE_NEW Created: 28/Apr/13  Updated: 06/Aug/14  Resolved: 01/May/13

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

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


 Description   

This issue is created automatically through a Github pull request on behalf of FabioBatSilva:

Url: https://github.com/doctrine/doctrine2/pull/655

Message:

http://www.doctrine-project.org/jira/browse/DDC-2409



 Comments   
Comment by Doctrine Bot [ 01/May/13 ]

A related Github Pull-Request [GH-655] was closed:
https://github.com/doctrine/doctrine2/pull/655

Comment by Doctrine Bot [ 06/Aug/14 ]

A related Github Pull-Request [GH-655] was closed:
https://github.com/doctrine/dbal/pull/655

Comment by Doctrine Bot [ 06/Aug/14 ]

A related Github Pull-Request [GH-655] was assigned:
https://github.com/doctrine/dbal/pull/655





[DDC-2417] [GH-653] [DDC-2415] Fix CustomIdGenerator inheritance Created: 26/Apr/13  Updated: 05/Aug/14  Resolved: 27/Apr/13

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

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


 Description   

This issue is created automatically through a Github pull request on behalf of FabioBatSilva:

Url: https://github.com/doctrine/doctrine2/pull/653

Message:

http://www.doctrine-project.org/jira/browse/DDC-2415



 Comments   
Comment by Doctrine Bot [ 27/Apr/13 ]

A related Github Pull-Request [GH-653] was closed:
https://github.com/doctrine/doctrine2/pull/653

Comment by Doctrine Bot [ 05/Aug/14 ]

A related Github Pull-Request [GH-653] was closed:
https://github.com/doctrine/dbal/pull/653





[DDC-2416] [GH-652] Fixed entities path Created: 26/Apr/13  Updated: 04/Aug/14  Resolved: 26/Apr/13

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

Type: Documentation Priority: Major
Reporter: Doctrine Bot Assignee: Marco Pivetta
Resolution: Fixed Votes: 0
Labels: None


 Description   

This issue is created automatically through a Github pull request on behalf of dannykopping:

Url: https://github.com/doctrine/doctrine2/pull/652

Message:

In the tutorial, the user is told to create a new file in the `/src` folder, and the `/entities` folder is never referenced. Updating the SQLite schema according to the tutorial fails with the 'No Metadata Classes to process.' message. Changing the folder to `/src` fixes this, ostensibly.



 Comments   
Comment by Doctrine Bot [ 26/Apr/13 ]

A related Github Pull-Request [GH-652] was closed:
https://github.com/doctrine/doctrine2/pull/652

Comment by Marco Pivetta [ 26/Apr/13 ]

merged

Comment by Doctrine Bot [ 04/Aug/14 ]

A related Github Pull-Request [GH-652] was assigned:
https://github.com/doctrine/dbal/pull/652

Comment by Doctrine Bot [ 04/Aug/14 ]

A related Github Pull-Request [GH-652] was closed:
https://github.com/doctrine/dbal/pull/652





[DDC-2412] [GH-651] Fixed typo in SQLFilter (use statement ClassMetadata) Created: 23/Apr/13  Updated: 04/Aug/14  Resolved: 23/Apr/13

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

Type: Bug Priority: Major
Reporter: Doctrine Bot Assignee: Marco Pivetta
Resolution: Fixed Votes: 0
Labels: None


 Description   

This issue is created automatically through a Github pull request on behalf of EuKov:

Url: https://github.com/doctrine/doctrine2/pull/651

Message:



 Comments   
Comment by Doctrine Bot [ 23/Apr/13 ]

A related Github Pull-Request [GH-651] was closed:
https://github.com/doctrine/doctrine2/pull/651

Comment by Marco Pivetta [ 23/Apr/13 ]

merged

Comment by Doctrine Bot [ 04/Aug/14 ]

A related Github Pull-Request [GH-651] was closed:
https://github.com/doctrine/dbal/pull/651





[DDC-2408] [GH-649] Update coding standards Created: 21/Apr/13  Updated: 04/Aug/14  Resolved: 21/Apr/13

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

Type: Documentation Priority: Major
Reporter: Doctrine Bot Assignee: Marco Pivetta
Resolution: Fixed Votes: 0
Labels: None


 Description   

This issue is created automatically through a Github pull request on behalf of calumbrodie:

Url: https://github.com/doctrine/doctrine2/pull/649

Message:

Removing underscores from property/method names and change use statements to PSR-2



 Comments   
Comment by Doctrine Bot [ 21/Apr/13 ]

A related Github Pull-Request [GH-649] was closed:
https://github.com/doctrine/doctrine2/pull/649

Comment by Marco Pivetta [ 21/Apr/13 ]

merged

Comment by Doctrine Bot [ 04/Aug/14 ]

A related Github Pull-Request [GH-649] was closed:
https://github.com/doctrine/dbal/pull/649

Comment by Doctrine Bot [ 04/Aug/14 ]

A related Github Pull-Request [GH-649] was closed:
https://github.com/doctrine/dbal/pull/649





[DDC-2396] [GH-646] Oracle Pagination bug when ordering is present Created: 09/Apr/13  Updated: 01/Aug/14  Resolved: 14/Apr/13

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

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


 Description   

This issue is created automatically through a Github pull request on behalf of raykolbe:

Url: https://github.com/doctrine/doctrine2/pull/646

Message:

Please reference http://www.doctrine-project.org/jira/browse/DDC-1800 and http://www.doctrine-project.org/jira/browse/DDC-1958#comment-19969.



 Comments   
Comment by Doctrine Bot [ 10/Apr/13 ]

A related Github Pull-Request [GH-646] was closed:
https://github.com/doctrine/doctrine2/pull/646

Comment by Doctrine Bot [ 01/Aug/14 ]

A related Github Pull-Request [GH-646] was assigned:
https://github.com/doctrine/dbal/pull/646

Comment by Doctrine Bot [ 01/Aug/14 ]

A related Github Pull-Request [GH-646] was closed:
https://github.com/doctrine/dbal/pull/646





[DDC-2379] [GH-637] Update association-mapping.rst Created: 29/Mar/13  Updated: 29/Jul/14  Resolved: 08/Sep/13

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

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


 Description   

This issue is created automatically through a Github pull request on behalf of choomz:

Url: https://github.com/doctrine/doctrine2/pull/637

Message:



 Comments   
Comment by Benjamin Eberlei [ 30/Mar/13 ]

A related Github Pull-Request [GH-637] was closed
https://github.com/doctrine/doctrine2/pull/637

Comment by Doctrine Bot [ 29/Jul/14 ]

A related Github Pull-Request [GH-637] was closed:
https://github.com/doctrine/dbal/pull/637





[DDC-2386] [GH-641] Added yml example in ordered-associations.rst Created: 03/Apr/13  Updated: 27/Jul/14  Resolved: 08/Sep/13

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

Type: Documentation Priority: Major
Reporter: Benjamin Eberlei Assignee: Marco Pivetta
Resolution: Fixed Votes: 0
Labels: None


 Description   

This issue is created automatically through a Github pull request on behalf of bksunday:

Url: https://github.com/doctrine/doctrine2/pull/641

Message:

Added missing yaml example of ordered-associations, and put php, xml and yml codes into a configuration-block instead of separate code-blocks



 Comments   
Comment by Benjamin Eberlei [ 03/Apr/13 ]

A related Github Pull-Request [GH-641] was closed
https://github.com/doctrine/doctrine2/pull/641

Comment by Marco Pivetta [ 03/Apr/13 ]

merged

Comment by Doctrine Bot [ 27/Jul/14 ]

A related Github Pull-Request [GH-641] was closed:
https://github.com/doctrine/dbal/pull/641





[DDC-2384] [GH-639] Added abillity to use metacolumn as indexBy Created: 02/Apr/13  Updated: 25/Jul/14  Resolved: 10/May/13

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

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


 Description   

This issue is created automatically through a Github pull request on behalf of goetas:

Url: https://github.com/doctrine/doctrine2/pull/639

Message:

Added ability to use meta column as indexBy. Useful if association entities is widely used.
Replace #204 PR



 Comments   
Comment by Doctrine Bot [ 10/May/13 ]

A related Github Pull-Request [GH-639] was closed:
https://github.com/doctrine/doctrine2/pull/639

Comment by Doctrine Bot [ 25/Jul/14 ]

A related Github Pull-Request [GH-639] was closed:
https://github.com/doctrine/dbal/pull/639





[DDC-2366] [GH-627] update document on Doctrine cache provider Created: 22/Mar/13  Updated: 22/Jul/14  Resolved: 24/Mar/13

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

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


 Description   

This issue is created automatically through a Github pull request on behalf of chuanma:

Url: https://github.com/doctrine/doctrine2/pull/627

Message:

A number of methods have been deleted long time ago. But they still show up on the document page.

http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/caching.html#deleting

http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/caching.html#counting

I checked source code. Most of the methods don't exist. They are better to be removed from the doc. I tried to use those functions and was surprised that they didn't exist.



 Comments   
Comment by Benjamin Eberlei [ 24/Mar/13 ]

A related Github Pull-Request [GH-627] was closed
https://github.com/doctrine/doctrine2/pull/627

Comment by Doctrine Bot [ 22/Jul/14 ]

A related Github Pull-Request [GH-627] was closed:
https://github.com/doctrine/dbal/pull/627





[DDC-2360] [GH-622] Import EntityManager from proper namespace Created: 21/Mar/13  Updated: 21/Jul/14  Resolved: 01/May/13

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

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


 Description   

This issue is created automatically through a Github pull request on behalf of hrubi:

Url: https://github.com/doctrine/doctrine2/pull/622

Message:



 Comments   
Comment by Benjamin Eberlei [ 21/Mar/13 ]

A related Github Pull-Request [GH-622] was closed
https://github.com/doctrine/doctrine2/pull/622

Comment by Doctrine Bot [ 21/Jul/14 ]

A related Github Pull-Request [GH-622] was closed:
https://github.com/doctrine/dbal/pull/622





[DDC-2494] Proxy getId not invoke convertToPHPValue on custom type Created: 08/Jun/13  Updated: 14/Jul/14  Resolved: 12/Jun/13

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

Type: Bug Priority: Critical
Reporter: Eduardo Oliveira Assignee: Fabio B. Silva
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Reference
is referenced by DDC-3192 Custom types do not get converted to ... Resolved

 Description   

I have a custom type tinyint:
https://gist.github.com/entering/3503d7458e5fbe2f6e02

I was using it a lot and when I updated to doctrine 2.4 beta it break some stuff. At the time i turn all on smallint and solve the problem, now I had time to look into it.

Example, entity Currency:

    /**
     * @var integer
     *
     * @ORM\Column(name="id", type="tinyint", nullable=false, options={"unsigned": true})
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    protected $id;

    /**
     * @ORM\Column(name="temp", type="tinyint", nullable=false)
     */
    protected $temp;

Entity Campaign:

    /**
     * @var Currency
     *
     * @ORM\ManyToOne(targetEntity="Currency", inversedBy="campaigns")
     * @ORM\JoinColumns({
     *   @ORM\JoinColumn(name="currency_id", referencedColumnName="id", nullable=false)
     * })
     */
    protected $currency;

When i have this piece of code:

var_dump($campaign->getCurrency()->getId());
var_dump($campaign->getCurrency()->getTemp());

I get:
string(1) "1"
int(5)

If I turn id into small int:
int(1)
int(5)

If I switch the order to:

var_dump($campaign->getCurrency()->getTemp());
var_dump($campaign->getCurrency()->getId());

As expected:
int(5)
int(1)

If I place a var_dump on convertToPHPValue I can see that is not being called on getId when getId is lazy.

This looks like a bug introduced when getId started being lazy to save queries.



 Comments   
Comment by Fabio B. Silva [ 10/Jun/13 ]

Before DCOM-96 we ignore custom type fields while looking for identifier getters.
It mean that, when an identifier getter is called the entity will be loaded from database, even though the identifier value is already known.
Then the Type#convertToPHPValue will be invoked..

After we move the proxy generation to common custom types are ignored and the database load its no longer triggered.

Comment by Eduardo Oliveira [ 10/Jun/13 ]

I understand the problem, because I was aware that getId() now doesn't load entity from DB, what is great in performance, I was expecting this for a while.

For me is really bad I cannot have ID's as tinyint (custom type), i suppose Doctrine doesn't support tinyint because is not present in all DB's, but some DB's like MySQL support it, I agree that Doctrine doesn't need to support all types out the box, but custom types should work exactly like native types, shouldn't be second class citizens.

If this is a limitation that is difficult to overpass and there are no plans to "fix" it, should be listed here: http://docs.doctrine-project.org/en/latest/reference/limitations-and-known-issues.html

And should be listed as BC in here: https://github.com/doctrine/doctrine2/blob/master/UPGRADE.md

If there are plans to fix this problem and is just a case of someone put hands on the code I can give it a shot even I'm not completely familiar with Doctrine code.

Comment by Marco Pivetta [ 10/Jun/13 ]

I don't think the bug is related with lazy loading. Identifiers are never hydrated into proxies anyway.

What the problem here seems to be is that the type conversion is not applied to meta columns.

You can check and see if there's code about type conversion in meta columns.

Comment by Eduardo Oliveira [ 10/Jun/13 ]

"What the problem here seems to be is that the type conversion is not applied to meta columns."

Marco I'm not sure If I follow you.

So when ID of entity Currency is a smallint a var_dump($campaign->getCurrency()) give this: https://gist.github.com/entering/5751908

  protected $id =>
  string(1) "1"

Is a string, the cast is done on getId()

Looking at the proxy created:

    /**
     * {@inheritDoc}
     */
    public function getId()
    {
       	if ($this->__isInitialized__ === false) {
            return (int)  parent::getId();
        }

        $this->__initializer__ && $this->__initializer__->__invoke($this, 'getId', array());

        return parent::getId();

The cast is written here: https://github.com/doctrine/doctrine2/blob/2.3/lib/Doctrine/ORM/Proxy/ProxyFactory.php#L259

Just to be sure I placed a var_dump inside convertToPHPValue of SmallIntType and on getId() is not called, but if I force the load of entity from DB (code below) converToPHPValue is called.

var_dump($campaign->getCurrency()->getCode());
var_dump($campaign->getCurrency()->getId());

So the problem here is that convertToPHPValue is never called on getId() on proxy when entity is not initialized, the problem is masked with the cast "written on hand" inside the getId().

The way I see it the getId() on proxy should all the time call convertToPHPValue, that way it would be correct with all types (native and custom).

The proxy with tinyint:

    /**
     * {@inheritDoc}
     */
    public function getId()
    {
        if ($this->__isInitialized__ === false) {
            return  parent::getId();
        }


        $this->__initializer__ && $this->__initializer__->__invoke($this, 'getId', array());

        return parent::getId();
    }

Before custom tinyint was working on Identifiers because getId() would need to load entity from DB, the entity would be hydrate and the convertToPHPValue called at that time, now getId() doesn't load entity from DB so is never called.

To me a cast (int) on proxy that is decided according the name type is a ugly hack, inside if ($this->_isInitialized_ === false) it should call all the time convertToPHPValue.

Comment by Fabio B. Silva [ 11/Jun/13 ]

A possible solution : https://github.com/doctrine/doctrine2/pull/690

Comment by Fabio B. Silva [ 12/Jun/13 ]

Fixed : https://github.com/doctrine/doctrine2/commit/6937061b23ec4de63081efac800415e09dcbcb4f





[DDC-2368] [GH-629] Fixed typos in Doctrine Mapping Types section. Created: 24/Mar/13  Updated: 08/Jul/14  Resolved: 08/Sep/13

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

Type: Documentation Priority: Major
Reporter: Benjamin Eberlei Assignee: Guilherme Blanco
Resolution: Fixed Votes: 0
Labels: None


 Description   

This issue is created automatically through a Github pull request on behalf of dustinmoorman:

Url: https://github.com/doctrine/doctrine2/pull/629

Message:

Hello guys! I am fixing some of the documentation in ``basic-mapping.rst`` that display an incorrect use of 'an' where 'a' should reside. Specifically in regards to instances of 'an SQL'.



 Comments   
Comment by Benjamin Eberlei [ 24/Mar/13 ]

A related Github Pull-Request [GH-629] was closed
https://github.com/doctrine/doctrine2/pull/629

Comment by Doctrine Bot [ 08/Jul/14 ]

A related Github Pull-Request [GH-629] was closed:
https://github.com/doctrine/dbal/pull/629





[DDC-2180] [GH-527] Fix documentation for Doctrine\ORM\Query\AST\Node::dispatch() Created: 30/Nov/12  Updated: 30/Jun/14  Resolved: 30/Nov/12

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

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


 Description   

This issue is created automatically through a Github pull request on behalf of BenMorel:

Url: https://github.com/doctrine/doctrine2/pull/527

Message:

Because Node::dispatch() is not documented as `@return string`, static code analysis returned the following error in our project:

> void method 'dispatch' result used

This fixes the documentation for this method.



 Comments   
Comment by Benjamin Eberlei [ 30/Nov/12 ]

A related Github Pull-Request [GH-527] was closed
https://github.com/doctrine/doctrine2/pull/527

Comment by Doctrine Bot [ 30/Jun/14 ]

A related Github Pull-Request [GH-527] was closed:
https://github.com/doctrine/dbal/pull/527





[DDC-2271] [GH-564] Fix a wrong return type Created: 03/Feb/13  Updated: 27/Jun/14  Resolved: 05/Feb/13

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

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


 Description   

This issue is created automatically through a Github pull request on behalf of BenMorel:

Url: https://github.com/doctrine/doctrine2/pull/564

Message:

`BasicEntityPersister::executeInserts()` is documented as:

@return array An array of any generated post-insert IDs. This will be an empty array
if the entity class does not use the IDENTITY generation strategy.

This PR fixes an empty `return;` that contradicted the documented return type.



 Comments   
Comment by Benjamin Eberlei [ 03/Feb/13 ]

A related Github Pull-Request [GH-564] was closed
https://github.com/doctrine/doctrine2/pull/564

Comment by Fabio B. Silva [ 05/Feb/13 ]

Merged : https://github.com/doctrine/doctrine2/commit/f0674ea034a12e99cfe745122ef3b3b71204657f

Comment by Doctrine Bot [ 27/Jun/14 ]

A related Github Pull-Request [GH-564] was closed:
https://github.com/doctrine/dbal/pull/564





[DDC-2201] [GH-537] fixed problems with joined inheritance and composite keys Created: 16/Dec/12  Updated: 26/Jun/14  Resolved: 04/May/13

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

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


 Description   

This issue is created automatically through a Github pull request on behalf of Powerhamster:

Url: https://github.com/doctrine/doctrine2/pull/537

Message:

SchemaTool now creates all Id columns not just only the first one.
Insert statement for child entity now contains parameter for additional key columns only once.



 Comments   
Comment by Doctrine Bot [ 04/May/13 ]

A related Github Pull-Request [GH-537] was closed:
https://github.com/doctrine/doctrine2/pull/537

Comment by Doctrine Bot [ 26/Jun/14 ]

A related Github Pull-Request [GH-537] was closed:
https://github.com/doctrine/dbal/pull/537





[DDC-2256] [GH-554] Fixed ObjectHydrator when namespace alias is given. Created: 24/Jan/13  Updated: 26/Jun/14  Resolved: 05/Feb/13

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

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


 Description   

This issue is created automatically through a Github pull request on behalf of beregond:

Url: https://github.com/doctrine/doctrine2/pull/554

Message:

Fixes problem when executing native query:
```php
$rsm = new ResultSetMapping();

$rsm->addEntityResult('DbBundle:Player', 'p');
$rsm->addFieldResult('p', 'id', 'id');
$rsm->addFieldResult('p', 'name', 'name');

$rsm->addJoinedEntityResult('DbBundle:User', 'u', 'p', 'user');
$rsm->addFieldResult('u', 'user_id', 'id');

$em->createNativeQuery('...', $rsm);
```

Hydrator couldn't find cached metadata, when "joined entity result" class name wasn't fully qualified name (as in the example above).



 Comments   
Comment by Benjamin Eberlei [ 02/Feb/13 ]

A related Github Pull-Request [GH-554] was closed
https://github.com/doctrine/doctrine2/pull/554

Comment by Fabio B. Silva [ 05/Feb/13 ]

Merged : https://github.com/doctrine/doctrine2/commit/dea37ed9e84922f37ef21740671e5e29c94454d3

Comment by Doctrine Bot [ 26/Jun/14 ]

A related Github Pull-Request [GH-554] was closed:
https://github.com/doctrine/dbal/pull/554





[DDC-2326] [GH-595] Fixed broken code block in documentation Created: 01/Mar/13  Updated: 26/Jun/14  Resolved: 12/Mar/13

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

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


 Description   

This issue is created automatically through a Github pull request on behalf of mnapoli:

Url: https://github.com/doctrine/doctrine2/pull/595

Message:



 Comments   
Comment by Benjamin Eberlei [ 12/Mar/13 ]

A related Github Pull-Request [GH-595] was closed
https://github.com/doctrine/doctrine2/pull/595

Comment by Doctrine Bot [ 26/Jun/14 ]

A related Github Pull-Request [GH-595] was closed:
https://github.com/doctrine/dbal/pull/595





[DDC-2328] [GH-597] use the extended proxy interface in the same namespace Created: 01/Mar/13  Updated: 26/Jun/14  Resolved: 03/Mar/13

Status: Resolved
Project: Doctrine 2 - ORM
Component/s: None
Affects Version/s: None
Fix Version/s: 2.4

Type: Bug Priority: Blocker
Reporter: Benjamin Eberlei Assignee: Guilherme Blanco
Resolution: Fixed Votes: 0
Labels: None


 Description   

This issue is created automatically through a Github pull request on behalf of MDrollette:

Url: https://github.com/doctrine/doctrine2/pull/597

Message:

Fix for this error:

FatalErrorException: Compile Error: Cannot use Doctrine\Common\Proxy\Proxy as Proxy because the name is already in use in .../vendor/doctrine/orm/lib/Doctrine/ORM/Proxy/ProxyFactory.php line 26



 Comments   
Comment by Marco Pivetta [ 03/Mar/13 ]

Marking as blocker - has to go in before 2.4

Comment by Benjamin Eberlei [ 03/Mar/13 ]

A related Github Pull-Request [GH-597] was closed
https://github.com/doctrine/doctrine2/pull/597

Comment by Marco Pivetta [ 03/Mar/13 ]

merged

Comment by Doctrine Bot [ 26/Jun/14 ]

A related Github Pull-Request [GH-597] was closed:
https://github.com/doctrine/dbal/pull/597





[DDC-2330] [GH-599] Removed unnecessary "<?php" from the docs Created: 03/Mar/13  Updated: 26/Jun/14  Resolved: 04/Mar/13

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

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


 Description   

This issue is created automatically through a Github pull request on behalf of alexcarol:

Url: https://github.com/doctrine/doctrine2/pull/599

Message:



 Comments   
Comment by Benjamin Eberlei [ 04/Mar/13 ]

A related Github Pull-Request [GH-599] was closed
https://github.com/doctrine/doctrine2/pull/599

Comment by Doctrine Bot [ 26/Jun/14 ]

A related Github Pull-Request [GH-599] was closed:
https://github.com/doctrine/dbal/pull/599





[DDC-2153] [GH-517] Fix for DDC-1765 Created: 17/Nov/12  Updated: 26/Jun/14  Resolved: 25/Nov/12

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

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


 Description   

This issue is created automatically through a Github pull request on behalf of nemekzg:

Url: https://github.com/doctrine/doctrine2/pull/517

Message:



 Comments   
Comment by Benjamin Eberlei [ 25/Nov/12 ]

A related Github Pull-Request [GH-517] was closed
https://github.com/doctrine/doctrine2/pull/517

Comment by Doctrine Bot [ 26/Jun/14 ]

A related Github Pull-Request [GH-517] was closed:
https://github.com/doctrine/dbal/pull/517





[DDC-2124] [GH-503] added unsigned mapping to SchemaTool options Created: 05/Nov/12  Updated: 26/Jun/14  Resolved: 06/Nov/12

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

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


 Description   

This issue is created automatically through a Github pull request on behalf of sebastianbauer:

Url: https://github.com/doctrine/doctrine2/pull/503

Message:

Just checking in SchemaTool if unsigned option is set and take this value.



 Comments   
Comment by Benjamin Eberlei [ 06/Nov/12 ]

A related Github Pull-Request [GH-503] was closed
https://github.com/doctrine/doctrine2/pull/503

Comment by Fabio B. Silva [ 06/Nov/12 ]

Merged : https://github.com/doctrine/doctrine2/commit/863d14a61a825d0a14f23b19e7c26cc6c01b4a76

Comment by Doctrine Bot [ 09/Jan/14 ]

A related Github Pull-Request [GH-503] was closed:
https://github.com/doctrine/dbal/pull/503

Comment by Doctrine Bot [ 26/Jun/14 ]

A related Github Pull-Request [GH-503] was closed:
https://github.com/doctrine/dbal/pull/503





[DDC-2265] [GH-561] fix typo in the documentation Created: 30/Jan/13  Updated: 16/May/14  Resolved: 05/Feb/13

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

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


 Description   

This issue is created automatically through a Github pull request on behalf of ftdebugger:

Url: https://github.com/doctrine/doctrine2/pull/561

Message:



 Comments   
Comment by Benjamin Eberlei [ 02/Feb/13 ]

A related Github Pull-Request [GH-561] was closed
https://github.com/doctrine/doctrine2/pull/561

Comment by Fabio B. Silva [ 05/Feb/13 ]

Merged : https://github.com/doctrine/doctrine2/commit/abc3ba0c7e039c469fb3f3ed96bdd4393085bfdb

Comment by Doctrine Bot [ 16/May/14 ]

A related Github Pull-Request [GH-561] was closed:
https://github.com/doctrine/dbal/pull/561





[DDC-2289] [GH-575] Added YAML configuration example for "Simple Derived Identity" in Docs Created: 08/Feb/13  Updated: 16/May/14  Resolved: 11/Feb/13

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

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


 Description   

This issue is created automatically through a Github pull request on behalf of naitsirch:

Url: https://github.com/doctrine/doctrine2/pull/575

Message:

I have added a missing YAML configuration example to the tutorial. Because I needed it for myself

See http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/tutorials/composite-primary-keys.html#use-case-2-simple-derived-identity

I hope the YAML definition is correct.



 Comments   
Comment by Benjamin Eberlei [ 11/Feb/13 ]

A related Github Pull-Request [GH-575] was closed
https://github.com/doctrine/doctrine2/pull/575

Comment by Doctrine Bot [ 16/May/14 ]

A related Github Pull-Request [GH-575] was closed:
https://github.com/doctrine/dbal/pull/575





[DDC-2343] [GH-608] Fixed typo Created: 11/Mar/13  Updated: 13/May/14  Resolved: 11/Mar/13

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

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


 Description   

This issue is created automatically through a Github pull request on behalf of pborreli:

Url: https://github.com/doctrine/doctrine2/pull/608

Message:



 Comments   
Comment by Benjamin Eberlei [ 11/Mar/13 ]

A related Github Pull-Request [GH-608] was closed
https://github.com/doctrine/doctrine2/pull/608

Comment by Doctrine Bot [ 13/May/14 ]

A related Github Pull-Request [GH-608] was closed:
https://github.com/doctrine/dbal/pull/608





[DDC-2344] [GH-609] Fixed typo. Created: 11/Mar/13  Updated: 13/May/14  Resolved: 11/Mar/13

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

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


 Description   

This issue is created automatically through a Github pull request on behalf of haroldb:

Url: https://github.com/doctrine/doctrine2/pull/609

Message:



 Comments   
Comment by Benjamin Eberlei [ 11/Mar/13 ]

A related Github Pull-Request [GH-609] was closed
https://github.com/doctrine/doctrine2/pull/609

Comment by Doctrine Bot [ 13/May/14 ]

A related Github Pull-Request [GH-609] was closed:
https://github.com/doctrine/dbal/pull/609





[DDC-2342] [GH-607] Fixed typos Created: 11/Mar/13  Updated: 13/May/14  Resolved: 11/Mar/13

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

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


 Description   

This issue is created automatically through a Github pull request on behalf of pborreli:

Url: https://github.com/doctrine/doctrine2/pull/607

Message:



 Comments   
Comment by Benjamin Eberlei [ 11/Mar/13 ]

A related Github Pull-Request [GH-607] was closed
https://github.com/doctrine/doctrine2/pull/607

Comment by Doctrine Bot [ 13/May/14 ]

A related Github Pull-Request [GH-607] was closed:
https://github.com/doctrine/dbal/pull/607





[DDC-2334] [GH-602] Added $isIdentifierColumn documentation Created: 06/Mar/13  Updated: 09/May/14  Resolved: 12/Mar/13

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

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


 Description   

This issue is created automatically through a Github pull request on behalf of alex88:

Url: https://github.com/doctrine/doctrine2/pull/602

Message:

I've added the documentation of the argument $isIdentifierColumn since in case of foreign composite keys it doesn't��hydrate more then one row.



 Comments   
Comment by Benjamin Eberlei [ 12/Mar/13 ]

A related Github Pull-Request [GH-602] was closed
https://github.com/doctrine/doctrine2/pull/602

Comment by Doctrine Bot [ 09/May/14 ]

A related Github Pull-Request [GH-602] was closed:
https://github.com/doctrine/dbal/pull/602





[DDC-2212] [GH-542] [DDC-2205] Fix DDC-2205 Created: 21/Dec/12  Updated: 08/May/14  Resolved: 21/Dec/12

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

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


 Description   

This issue is created automatically through a Github pull request on behalf of FabioBatSilva:

Url: https://github.com/doctrine/doctrine2/pull/542

Message:

http://www.doctrine-project.org/jira/browse/DDC-2205



 Comments   
Comment by Benjamin Eberlei [ 21/Dec/12 ]

A related Github Pull-Request [GH-542] was closed
https://github.com/doctrine/doctrine2/pull/542

Comment by Fabio B. Silva [ 21/Dec/12 ]

merged : https://github.com/doctrine/doctrine2/commit/8b5e4a9a52670992b85e7223d255b98cf77a35a3

Comment by Doctrine Bot [ 08/May/14 ]

A related Github Pull-Request [GH-542] was closed:
https://github.com/doctrine/dbal/pull/542





[DDC-2261] [GH-558] Added missing mapping types Created: 26/Jan/13  Updated: 08/May/14  Resolved: 26/Jan/13

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

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


 Description   

This issue is created automatically through a Github pull request on behalf of pkruithof:

Url: https://github.com/doctrine/doctrine2/pull/558

Message:



 Comments   
Comment by Benjamin Eberlei [ 26/Jan/13 ]

A related Github Pull-Request [GH-558] was closed
https://github.com/doctrine/doctrine2/pull/558

Comment by Doctrine Bot [ 08/May/14 ]

A related Github Pull-Request [GH-558] was closed:
https://github.com/doctrine/dbal/pull/558





[DDC-2333] [GH-601] Add 'contains' comparison Created: 05/Mar/13  Updated: 08/May/14  Resolved: 12/Mar/13

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

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


 Description   

This issue is created automatically through a Github pull request on behalf of jankramer:

Url: https://github.com/doctrine/doctrine2/pull/601

Message:

As mentioned by @stof in doctrine/collections#5, the 'contains' comparison for matching collections should also be added to the ORM.

The first commit is only present in this PR because the doctrine/collections 1.0 release does not contain the recent addition. It should be removed/altered after a new version has been tagged, I think?



 Comments   
Comment by Benjamin Eberlei [ 12/Mar/13 ]

A related Github Pull-Request [GH-601] was closed
https://github.com/doctrine/doctrine2/pull/601

Comment by Doctrine Bot [ 08/May/14 ]

A related Github Pull-Request [GH-601] was closed:
https://github.com/doctrine/dbal/pull/601





[DDC-2327] [GH-596] Missing link to a cookbook in the docs Created: 01/Mar/13  Updated: 05/May/14  Resolved: 04/Mar/13

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

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


 Description   

This issue is created automatically through a Github pull request on behalf of mnapoli:

Url: https://github.com/doctrine/doctrine2/pull/596

Message:

The cookbook existed in the docs but there was no link to it in the docs.



 Comments   
Comment by Benjamin Eberlei [ 04/Mar/13 ]

A related Github Pull-Request [GH-596] was closed
https://github.com/doctrine/doctrine2/pull/596

Comment by Doctrine Bot [ 05/May/14 ]

A related Github Pull-Request [GH-596] was closed:
https://github.com/doctrine/dbal/pull/596





[DDC-2312] [GH-586] Fix EntityManager doc Created: 21/Feb/13  Updated: 05/May/14  Resolved: 21/Feb/13

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

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


 Description   

This issue is created automatically through a Github pull request on behalf of jsjohns:

Url: https://github.com/doctrine/doctrine2/pull/586

Message:



 Comments   
Comment by Benjamin Eberlei [ 21/Feb/13 ]

A related Github Pull-Request [GH-586] was closed
https://github.com/doctrine/doctrine2/pull/586

Comment by Doctrine Bot [ 05/May/14 ]

A related Github Pull-Request [GH-586] was closed:
https://github.com/doctrine/dbal/pull/586





[DDC-2284] [GH-573] [Documentation] Noted prePersist event only triggers on first persist Created: 07/Feb/13  Updated: 05/May/14  Resolved: 08/Feb/13

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

Type: Documentation Priority: Major
Reporter: Benjamin Eberlei Assignee: Guilherme Blanco
Resolution: Fixed Votes: 0
Labels: None


 Description   

This issue is created automatically through a Github pull request on behalf of EvanK:

Url: https://github.com/doctrine/doctrine2/pull/573

Message:

While probably obvious to a core doctrine developer, a user of doctrine would not necessarily know this without doing some digging or [stack overflowing](http://stackoverflow.com/questions/7934555/doctrine-2-prepersist-doesnt-fire)



 Comments   
Comment by Benjamin Eberlei [ 08/Feb/13 ]

A related Github Pull-Request [GH-573] was closed
https://github.com/doctrine/doctrine2/pull/573

Comment by Doctrine Bot [ 05/May/14 ]

A related Github Pull-Request [GH-573] was closed:
https://github.com/doctrine/dbal/pull/573





[DDC-2325] [GH-594] Use inflector in EntityGenerator Created: 28/Feb/13  Updated: 02/May/14  Resolved: 01/Mar/13

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

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


 Description   

This issue is created automatically through a Github pull request on behalf of v3labs:

Url: https://github.com/doctrine/doctrine2/pull/594

Message:

The way EntityGenerator handles add/edit methods is wrong.

Example:

class SomeEntity

{ /* @ORM\OneToMany(...) */ private $entries; }

In this case the generator creates

addEntrie and removeEntrie methods. They should be be addEntry and removeEntry

This patch fixes that.



 Comments   
Comment by Benjamin Eberlei [ 01/Mar/13 ]

A related Github Pull-Request [GH-594] was closed
https://github.com/doctrine/doctrine2/pull/594

Comment by Marco Pivetta [ 01/Mar/13 ]

merged

Comment by Doctrine Bot [ 02/May/14 ]

A related Github Pull-Request [GH-594] was closed:
https://github.com/doctrine/dbal/pull/594





[DDC-2320] [GH-591] Remove dead code Created: 26/Feb/13  Updated: 01/May/14  Resolved: 12/Mar/13

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

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


 Description   

This issue is created automatically through a Github pull request on behalf of Aitboudad:

Url: https://github.com/doctrine/doctrine2/pull/591

Message:



 Comments   
Comment by Doctrine Bot [ 01/May/14 ]

A related Github Pull-Request [GH-591] was closed:
https://github.com/doctrine/dbal/pull/591





[DDC-2306] Lazy loading associated entity's property causes identity loss when another association is set to fetch="EAGER" Created: 20/Feb/13  Updated: 29/Apr/14  Due: 22/Feb/13  Resolved: 26/Feb/13

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

Type: Bug Priority: Critical
Reporter: William Schaller Assignee: Marco Pivetta
Resolution: Fixed Votes: 0
Labels: orm, proxy, unitofwork
Environment:

PHP 5.4 - IIS 7.0


Attachments: Zip Archive sandbox-uow-issue.zip    

 Description   

There appears to be a bug in UnitOfWork.php, introduced in Merge pull request #406 from Ocramius/DCOM-96. The relevant section is lines 2479-2495.

In the attached test sandbox, there are 4 entities.

User and Address have a many-many relationship via UserAddress – this more or less duplicates what I have in my actual application. There is another entity that both User and Address refer to in a one-to-many relationship – Zone.

When the Zone relationship on User and Address is set to fetch="LAZY", the problem is absent. When the relationship is set to fetch="EAGER", the problem manifests as such:

When I load a User via $em->find(), and then access properties on a related Address, the identity of the Address is lost. The same is true going in the other direction. I var_dump the Address before accessing its street property, and it shows up properly as an uninitialized proxy with just the id set. After I access the street property of the Address, var_dump shows the proxy is loaded and initialized, with all properties set except the identity, which is now null.

I stepped through the code using XDebug, and found that the referenced lines in UnitOfWork.php are setting the created Address entity's properties incorrectly, removing the identity from the generated entity. It seems to have something to do with the _hints parameter.

I'm not sure what the fix is, because I am not familiar enough with this part of the code and what it is intended to do. I assume that this is not intended behavior.

I've included my test case sandbox, which references ../../../../autoload.php to load Doctrine. This was tested against doctrine2/master as of today.



 Comments   
Comment by Marco Pivetta [ 21/Feb/13 ]

I've created a branch with a fix at https://github.com/Ocramius/doctrine2/compare/hotfix;DDC-2306

Basically, what was happening here is a really nasty one:

The UnitOfWork did consider the `Zone` entity as if it was a `User` entity (not comparing classnames, basically). Since the identifier was also the same in this case, the two entities were compared as if the newly loaded `Zone` had to replace the existing `User` proxy.

Thus, the proxy was marked as un-managed and trashed (and so the identifier was also nulled).

Please pull the branch and give it a try. I'll re-read it tomorrow and then open a PR.

Comment by William Schaller [ 21/Feb/13 ]

This fixes the problem for the test case and for my app. Excellent speedy fix, thanks

Comment by Benjamin Eberlei [ 21/Feb/13 ]

A related Github Pull-Request [GH-585] was opened
https://github.com/doctrine/doctrine2/pull/585

Comment by Benjamin Eberlei [ 26/Feb/13 ]

A related Github Pull-Request [GH-585] was closed
https://github.com/doctrine/doctrine2/pull/585

Comment by Doctrine Bot [ 29/Apr/14 ]

A related Github Pull-Request [GH-585] was closed:
https://github.com/doctrine/dbal/pull/585





[DDC-2304] [GH-583] accept more than 2 parameters in CONCAT function Created: 19/Feb/13  Updated: 29/Apr/14  Resolved: 12/Mar/13

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

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


 Description   

This issue is created automatically through a Github pull request on behalf of broncha:

Url: https://github.com/doctrine/doctrine2/pull/583

Message:

The DBAL Platform supports more then 2 parameters but the ConcatFunction only validates 2 parameters to CONCAT. This commit allows to pass more than 2 parameters to CONCAT. Also this change would require that `getConcatExpression` accept array as a parameter. I have opened a pull request for that as well.



 Comments   
Comment by Doctrine Bot [ 29/Apr/14 ]

A related Github Pull-Request [GH-583] was closed:
https://github.com/doctrine/dbal/pull/583





[DDC-2315] [GH-587] Fixed the license and the added version for NewObjectExpression Created: 22/Feb/13  Updated: 29/Apr/14  Resolved: 22/Feb/13

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

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


 Description   

This issue is created automatically through a Github pull request on behalf of stof:

Url: https://github.com/doctrine/doctrine2/pull/587

Message:

this feature is new in 2.4, not 2.3



 Comments   
Comment by Benjamin Eberlei [ 22/Feb/13 ]

A related Github Pull-Request [GH-587] was closed
https://github.com/doctrine/doctrine2/pull/587

Comment by Doctrine Bot [ 29/Apr/14 ]

A related Github Pull-Request [GH-587] was closed:
https://github.com/doctrine/dbal/pull/587





[DDC-2298] [GH-581] Removing submodules Created: 15/Feb/13  Updated: 29/Apr/14  Resolved: 15/Feb/13

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

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


 Description   

This issue is created automatically through a Github pull request on behalf of Ocramius:

Url: https://github.com/doctrine/doctrine2/pull/581

Message:

Removing submodules (my bad, wasn't done in #570 )



 Comments   
Comment by Benjamin Eberlei [ 15/Feb/13 ]

A related Github Pull-Request [GH-581] was closed
https://github.com/doctrine/doctrine2/pull/581

Comment by Marco Pivetta [ 15/Feb/13 ]

merged

Comment by Doctrine Bot [ 29/Apr/14 ]

A related Github Pull-Request [GH-581] was closed:
https://github.com/doctrine/dbal/pull/581





[DDC-2169] [GH-524] EntityManagerDecorator base class as an extension point for EntityManager Created: 26/Nov/12  Updated: 24/Apr/14  Resolved: 04/May/13

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

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


 Description   

This issue is created automatically through a Github pull request on behalf of lstrojny:

Url: https://github.com/doctrine/doctrine2/pull/524

Message:

As discussed on IRC. Open issues to be discussed:



 Comments   
Comment by Doctrine Bot [ 04/May/13 ]

A related Github Pull-Request [GH-524] was closed:
https://github.com/doctrine/doctrine2/pull/524

Comment by Doctrine Bot [ 24/Apr/14 ]

A related Github Pull-Request [GH-524] was closed:
https://github.com/doctrine/dbal/pull/524





[DDC-2202] [GH-538] IDENTITY() Support composite primary key Created: 16/Dec/12  Updated: 24/Apr/14  Resolved: 24/Dec/12

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

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


 Description   

This issue is created automatically through a Github pull request on behalf of FabioBatSilva:

Url: https://github.com/doctrine/doctrine2/pull/538

Message:

This patch add support for composite primary key to identity function



 Comments   
Comment by Benjamin Eberlei [ 24/Dec/12 ]

A related Github Pull-Request [GH-538] was closed
https://github.com/doctrine/doctrine2/pull/538

Comment by Doctrine Bot [ 24/Apr/14 ]

A related Github Pull-Request [GH-538] was closed:
https://github.com/doctrine/dbal/pull/538





[DDC-2270] [GH-563] DDC-2268 - Regression test Created: 02/Feb/13  Updated: 24/Apr/14  Resolved: 02/Feb/13

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

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


 Description   

This issue is created automatically through a Github pull request on behalf of FabioBatSilva:

Url: https://github.com/doctrine/doctrine2/pull/563

Message:

http://www.doctrine-project.org/jira/browse/DDC-2268

Not sure when, but it is already fixed in master.



 Comments   
Comment by Benjamin Eberlei [ 02/Feb/13 ]

A related Github Pull-Request [GH-563] was closed
https://github.com/doctrine/doctrine2/pull/563

Comment by Fabio B. Silva [ 02/Feb/13 ]

merged : https://github.com/doctrine/doctrine2/commit/1627fc95965a3e2e3894fcf7e524eb0eaa9d0ddd

Comment by Doctrine Bot [ 24/Apr/14 ]

A related Github Pull-Request [GH-563] was closed:
https://github.com/doctrine/dbal/pull/563





[DDC-2273] [GH-566] Added missing return statement to AbstractCommand. Created: 03/Feb/13  Updated: 22/Apr/14  Resolved: 05/Feb/13

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

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


 Description   

This issue is created automatically through a Github pull request on behalf of BenMorel:

Url: https://github.com/doctrine/doctrine2/pull/566

Message:

The `AbstractCommand::execute()` method should return an `integer`, or `null`.

Although in PHP, omitting the `return` statement is equivalent to returning `null`, it is recommended to put an explicit `return` to clearly differentiate it from `return void`.

I've added `return 0;` here, keeping the existent behavior.



 Comments   
Comment by Benjamin Eberlei [ 03/Feb/13 ]

A related Github Pull-Request [GH-566] was closed
https://github.com/doctrine/doctrine2/pull/566

Comment by Fabio B. Silva [ 05/Feb/13 ]

Merged : https://github.com/doctrine/doctrine2/commit/d3cbdfcafa3e8dbb1d3f7029f31eb6412855c097

Comment by Doctrine Bot [ 22/Apr/14 ]

A related Github Pull-Request [GH-566] was closed:
https://github.com/doctrine/dbal/pull/566





[DDC-2276] [GH-569] Hotfix/pre flush event args params Created: 04/Feb/13  Updated: 18/Apr/14  Resolved: 12/Feb/13

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

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


 Description   

This issue is created automatically through a Github pull request on behalf of Ocramius:

Url: https://github.com/doctrine/doctrine2/pull/569

Message:

As reported by a user on IRC, the `PreFlushEventArgs` object was built with incorrect parameters. this fix solves the problem by typehinting the constructor.

Tests aren't really necessary since a lot of functional tests were simply broken because of this additional typehint.



 Comments   
Comment by Benjamin Eberlei [ 12/Feb/13 ]

A related Github Pull-Request [GH-569] was closed
https://github.com/doctrine/doctrine2/pull/569

Comment by Fabio B. Silva [ 12/Feb/13 ]

Merged : https://github.com/doctrine/doctrine2/commit/719031f2effd2074d94c709b6b7311fb0773fb7f

Comment by Doctrine Bot [ 18/Apr/14 ]

A related Github Pull-Request [GH-569] was closed:
https://github.com/doctrine/dbal/pull/569





[DDC-2274] [GH-567] Removed outdated methods in DatabasePlatformMock Created: 03/Feb/13  Updated: 17/Apr/14  Resolved: 05/Feb/13

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

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


 Description   

This issue is created automatically through a Github pull request on behalf of BenMorel:

Url: https://github.com/doctrine/doctrine2/pull/567

Message:

`DatabasePlatformMock::getNativeDeclaration()` and `getPortableDeclaration()` do not override an existing method in `AbstractPlatform`.
I guess they are leftovers of a previous version, and should be removed.



 Comments   
Comment by Benjamin Eberlei [ 03/Feb/13 ]

A related Github Pull-Request [GH-567] was closed
https://github.com/doctrine/doctrine2/pull/567

Comment by Fabio B. Silva [ 05/Feb/13 ]

merged : https://github.com/doctrine/doctrine2/commit/ef1ed588b5db6f87399772f953bf8b6dc4d2556d

Comment by Doctrine Bot [ 17/Apr/14 ]

A related Github Pull-Request [GH-567] was closed:
https://github.com/doctrine/dbal/pull/567





[DDC-2272] [GH-565] Removed an unused local variable. Created: 03/Feb/13  Updated: 13/Apr/14  Resolved: 05/Feb/13

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

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


 Description   

This issue is created automatically through a Github pull request on behalf of BenMorel:

Url: https://github.com/doctrine/doctrine2/pull/565

Message:

This PR removes an unused (redundant) local variable declaration.



 Comments   
Comment by Benjamin Eberlei [ 03/Feb/13 ]

A related Github Pull-Request [GH-565] was closed
https://github.com/doctrine/doctrine2/pull/565

Comment by Fabio B. Silva [ 05/Feb/13 ]

Merged : https://github.com/doctrine/doctrine2/commit/114827a4b32fe309519cf3f9bdfedb3599d52f37

Comment by Doctrine Bot [ 13/Apr/14 ]

A related Github Pull-Request [GH-565] was closed:
https://github.com/doctrine/dbal/pull/565





[DDC-2687] Paginator with ORDER BY not working in MSSQL Created: 18/Sep/13  Updated: 04/Apr/14  Resolved: 12/Jan/14

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

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

Symfony 2.3, SQL Server 2008 R2



 Description   

This bug report is similar to this one:
http://www.doctrine-project.org/jira/browse/DDC-2622

It's decided to make a new bug report to keep things cleaner (commits have already been done on the other report).

PHP code to test (A symfony 2.3 controller):

Unable to find source-code formatter for language: php. Available languages are: actionscript, html, java, javascript, none, sql, xhtml, xml
<?php
public function testAction() {
	$em = $this->getDoctrine()->getManager();
	$query = $em->createQuery("
		SELECT report, user
		FROM Report:Report report

		JOIN report.user user

		WHERE user.id = ?1
		ORDER BY report.created DESC
	");
	$query->setMaxResults(10);
	$query->setParameter(1, 1);
	$paginator = new Paginator($query, $fetchJoinCollection = true);
	$result = $paginator->getIterator(); // Trigger querying, using paginator
	//$result = $query->getResult();

	return [
		'var' => $result
	];
}
// returning the result to a template debug function

Schema:
One User to Many Reports

SQL + ERROR:

An exception occurred while executing '
SELECT *
FROM (
	SELECT DISTINCT id0
		,ROW_NUMBER() OVER (
			ORDER BY r0_.aangemaakt DESC
			) AS doctrine_rownum
	FROM (
		SELECT r0_.id AS id0
			,r0_.Naam AS Naam1
			,r0_.Omschrijving AS Omschrijving2
			,r0_.aangemaakt AS aangemaakt3
			,r0_.gewijzigd AS gewijzigd4
			,r0_.verwijderd AS verwijderd5
			,g1_.username AS username6
			,g1_.username_canonical AS username_canonical7
			,g1_.email AS email8
			,g1_.email_canonical AS email_canonical9
			,g1_.enabled AS enabled10
			,g1_.salt AS salt11
			,g1_.password AS password12
			,g1_.last_login AS last_login13
			,g1_.locked AS locked14
			,g1_.expired AS expired15
			,g1_.expires_at AS expires_at16
			,g1_.confirmation_token AS confirmation_token17
			,g1_.password_requested_at AS password_requested_at18
			,g1_.roles AS roles19
			,g1_.credentials_expired AS credentials_expired20
			,g1_.credentials_expire_at AS credentials_expire_at21
			,g1_.id AS id22
		FROM Rapporten r0_ WITH (NOLOCK)
		INNER JOIN Gebruiker g1_ ON r0_.GebruikerId = g1_.id
		WHERE (g1_.id = ?)
			AND (r0_.verwijderd IS NULL)
		) dctrn_result
	) AS doctrine_tbl
WHERE doctrine_rownum BETWEEN 1
		AND 10
' with params [1]:

SQLSTATE[42000]: [Microsoft][SQL Server Native Client 11.0][SQL Server]The multi-part identifier "r0_.aangemaakt" could not be bound. 

FIX:
Change

ORDER BY r0_.aangemaakt DESC

to

ORDER BY aangemaakt3 DESC

This fix should only be applied in case of the Paginator scenario, which looks like this:

Unable to find source-code formatter for language: php. Available languages are: actionscript, html, java, javascript, none, sql, xhtml, xml
	$paginator = new Paginator($query, $fetchJoinCollection = true);
	$result = $paginator->getIterator(); // Trigger querying, using paginator
	//$result = $query->getResult();

When getting a normal result, like this:

Unable to find source-code formatter for language: php. Available languages are: actionscript, html, java, javascript, none, sql, xhtml, xml
	//$paginator = new Paginator($query, $fetchJoinCollection = true);
	//$result = $paginator->getIterator(); // Trigger querying, using paginator
	$result = $query->getResult();

it works fine without any problems.

The "normal" result should keep working correctly!

The SQL produced by the non-paginator result:

FROM (
	SELECT r0_.id AS id0
		,r0_.Naam AS Naam1
		,r0_.Omschrijving AS Omschrijving2
		,r0_.aangemaakt AS aangemaakt3
		,r0_.gewijzigd AS gewijzigd4
		,r0_.verwijderd AS verwijderd5
		,g1_.username AS username6
		,g1_.username_canonical AS username_canonical7
		,g1_.email AS email8
		,g1_.email_canonical AS email_canonical9
		,g1_.enabled AS enabled10
		,g1_.salt AS salt11
		,g1_.password AS password12
		,g1_.last_login AS last_login13
		,g1_.locked AS locked14
		,g1_.expired AS expired15
		,g1_.expires_at AS expires_at16
		,g1_.confirmation_token AS confirmation_token17
		,g1_.password_requested_at AS password_requested_at18
		,g1_.roles AS roles19
		,g1_.credentials_expired AS credentials_expired20
		,g1_.credentials_expire_at AS credentials_expire_at21
		,g1_.id AS id22
		,r0_.GebruikerId AS GebruikerId23
		,g1_.group_id AS group_id24
		,ROW_NUMBER() OVER (
			ORDER BY r0_.aangemaakt DESC
			) AS doctrine_rownum
	FROM Rapporten r0_ WITH (NOLOCK)
	INNER JOIN Gebruiker g1_ ON r0_.GebruikerId = g1_.id
	WHERE (g1_.id = ?)
		AND (r0_.verwijderd IS NULL)
	) AS doctrine_tbl
WHERE doctrine_rownum BETWEEN 1
		AND 10

Notice

ORDER BY r0_.aangemaakt DESC

this is correct!

The difference is that the Paginator wraps the query in in a query with distinct, this is done here:
https://github.com/doctrine/doctrine2/blob/master/lib/Doctrine/ORM/Tools/Pagination/LimitSubqueryOutputWalker.php#L160

So far i know two different solutions.

1.
Detect the wrapping query in SQLServerPlatform::doModifyLimitQuery with regex. See relevant code snippet below

Unable to find source-code formatter for language: php. Available languages are: actionscript, html, java, javascript, none, sql, xhtml, xml
if (preg_match('/SELECT DISTINCT .* FROM \(.*\) dctrn_result/', $query)) {
		$isWrapped = true;
} else {
		$isWrapped = false;
}

//Find alias for each colum used in ORDER BY
if ( ! empty($orderbyColumns)) {
		foreach ($orderbyColumns as $column) {

				if ($isWrapped) {
						$pattern    = sprintf('/%s\.%s\s+(AS\s+)?([^,\s\)]+)/i', $column['table'], $column['column']);
						$overColumn = preg_match($pattern, $query, $matches) ? $matches[2] : $column['column'];
				} else {
						$pattern    = sprintf('/%s\.(%s)\s*(AS)?\s*([^,\s\)]*)/i', $column['table'], $column['column']);
						$overColumn = preg_match($pattern, $query, $matches)
								? ($column['hasTable'] ? $column['table']  . '.' : '') . $column['column'] 
								: $column['column'];
				}

				if (isset($column['sort'])) {
						$overColumn .= ' ' . $column['sort'];
				}

				$overColumns[] = $overColumn;
		}
}

This code would replace:
https://github.com/doctrine/dbal/blob/master/lib/Doctrine/DBAL/Platforms/SQLServerPlatform.php#L856-L870
And takes two lines of codes from this commit:
https://github.com/doctrine/dbal/blob/5d7bcb6637646eb1daf6d90827233f5562cbda29/lib/Doctrine/DBAL/Platforms/SQLServerPlatform.php#L860-L861

Another solution is that the Paginator should be responsible for notifying the SQLServerPlatform::doModifyLimitQuery method if the query is wrapped or not. In that case, this line of code
https://github.com/doctrine/doctrine2/blob/master/lib/Doctrine/ORM/Tools/Pagination/LimitSubqueryOutputWalker.php#L171
should be replaced by

Unable to find source-code formatter for language: php. Available languages are: actionscript, html, java, javascript, none, sql, xhtml, xml
$sql, $this->maxResults, $this->firstResult, true

And this line of code:
https://github.com/doctrine/dbal/blob/master/lib/Doctrine/DBAL/Platforms/SQLServerPlatform.php#L818
should be replaced by

Unable to find source-code formatter for language: php. Available languages are: actionscript, html, java, javascript, none, sql, xhtml, xml
protected function doModifyLimitQuery($query, $limit, $offset = null, $isWrapped = false)

Of course parts of the code from the previous solution are still needed. But the $isWrapped detection is not done anymore by regex this way.



 Comments   
Comment by Flip [ 18/Sep/13 ]

I ran the full doctrine orm testsuite on a SQL Server 2008 R2 database. A before and after the first suggested bug fix has been applied. Tests results showed no difference at all. This means:
1. The change does not break any other stuff
2. There is no test yet to cover this case

Comment by Flip [ 12/Jan/14 ]

solved bug, can be closed. See: https://github.com/doctrine/dbal/pull/383

Comment by Marco Pivetta [ 12/Jan/14 ]

Merged: https://github.com/doctrine/dbal/commit/b4bcc18fe0d1b99e37ad51a4a25a04a83ab9d99a

Comment by Doctrine Bot [ 04/Apr/14 ]

A related Github Pull-Request [GH-789] was closed:
https://github.com/doctrine/doctrine2/pull/789





[DDC-2622] Paginator with ORDER BY not working in MSSQL Created: 20/Aug/13  Updated: 04/Apr/14  Resolved: 12/Jan/14

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

Type: Bug Priority: Major
Reporter: Flip Assignee: Marco Pivetta
Resolution: Duplicate Votes: 0
Labels: None
Environment:

SQL Server 2008 R2, Symfony 2.3 FOS User Bundle



 Description   

PHP code to test (A symfony 2.3 controller):

<?php
public function testAction() {
	$em = $this->getDoctrine()->getManager();
	$query = $em->createQuery("
		SELECT report, user
		FROM Report:Report report
		
		JOIN report.user user

		WHERE user.id = ?1
		ORDER BY report.created DESC
	");
	$query->setMaxResults(10);
	$query->setParameter(1, 1);
	$results = new Paginator($query, $fetchJoinCollection = true);
	foreach ($results as $result) {}; // This was needed to trigger the query o_O

	return new Response();
}

Schema:
One User to Many Reports

SQL + ERROR:

An exception occurred while executing '
SELECT *
FROM (
	SELECT DISTINCT id0
		,ROW_NUMBER() OVER (
			ORDER BY r0_.aangemaakt DESC
			) AS doctrine_rownum
	FROM (
		SELECT r0_.id AS id0
			,r0_.Naam AS Naam1
			,r0_.Omschrijving AS Omschrijving2
			,r0_.aangemaakt AS aangemaakt3
			,r0_.gewijzigd AS gewijzigd4
			,r0_.verwijderd AS verwijderd5
			,g1_.username AS username6
			,g1_.username_canonical AS username_canonical7
			,g1_.email AS email8
			,g1_.email_canonical AS email_canonical9
			,g1_.enabled AS enabled10
			,g1_.salt AS salt11
			,g1_.password AS password12
			,g1_.last_login AS last_login13
			,g1_.locked AS locked14
			,g1_.expired AS expired15
			,g1_.expires_at AS expires_at16
			,g1_.confirmation_token AS confirmation_token17
			,g1_.password_requested_at AS password_requested_at18
			,g1_.roles AS roles19
			,g1_.credentials_expired AS credentials_expired20
			,g1_.credentials_expire_at AS credentials_expire_at21
			,g1_.id AS id22
		FROM Rapporten r0_ WITH (NOLOCK)
		INNER JOIN Gebruiker g1_ ON r0_.GebruikerId = g1_.id
		WHERE (g1_.id = ?)
			AND (r0_.verwijderd IS NULL)
		) dctrn_result
	) AS doctrine_tbl
WHERE doctrine_rownum BETWEEN 1
		AND 10
' with params [1]:

SQLSTATE[42000]: [Microsoft][SQL Server Native Client 11.0][SQL Server]The multi-part identifier "r0_.aangemaakt" could not be bound. 

FIX:
Change

ORDER BY r0_.aangemaakt DESC

to

ORDER BY aangemaakt3 DESC


 Comments   
Comment by Flip [ 20/Aug/13 ]

I didn't get the Paginator working yet, but as i understand this is the first of 3 (maybe 2) queries, as described here: http://docs.doctrine-project.org/en/latest/tutorials/pagination.html It seems that in this first query it's not necessary to SELECT all these columns, so there is an opportunity here for a performance boost when not selecting them. (They still have to be selected in the final query to get the results).

Comment by Marco Pivetta [ 15/Sep/13 ]

Just a note: the DQL query you're doing here is very dangerous hydration-wise. Don't ever filter on fetch-joined results.

Comment by Marco Pivetta [ 15/Sep/13 ]

Provided patches at https://github.com/doctrine/doctrine2/pull/789 and https://github.com/doctrine/dbal/pull/371

Comment by Flip [ 16/Sep/13 ]

I don't understand your comment about filtering on fetch-join results being dangerous for hydration, could you please elaborate?

Comment by Marco Pivetta [ 16/Sep/13 ]

Flip it's unrelated to this change. I'd just explain that on IRC to avoid cluttering the issue here.

Comment by Doctrine Bot [ 16/Sep/13 ]

A related Github Pull-Request [GH-371] was closed:
https://github.com/doctrine/dbal/pull/371

Comment by Flip [ 12/Jan/14 ]

Can be closed in favor of http://www.doctrine-project.org/jira/browse/DDC-2687

Comment by Marco Pivetta [ 12/Jan/14 ]

Handled in DDC-2687

Comment by Doctrine Bot [ 04/Apr/14 ]

A related Github Pull-Request [GH-789] was closed:
https://github.com/doctrine/doctrine2/pull/789





[DDC-1106] Wrong inversedBy in example Created: 07/Apr/11  Updated: 01/Apr/14  Resolved: 01/Apr/14

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

Type: Documentation Priority: Major
Reporter: cristobal castro Assignee: Benjamin Eberlei
Resolution: Fixed Votes: 0
Labels: None

Attachments: Zip Archive screen-shot.zip    

 Description   

on page http://www.doctrine-project.org/docs/orm/2.0/en/reference/working-with-objects.html
section : 8.1. Association Example Entities, first example. Please see the .jpg in attachement(it explains clearly what I think is an error)
Regards.



 Comments   
Comment by Steve Müller [ 01/Apr/14 ]

Fixed in commit: https://github.com/doctrine/doctrine2/commit/10c48bad7b79af84855f7c63590f1f426770ed6b





[DDC-1180] Indexed Associations: foreign key (association) cannot be used as indexBy field Created: 29/May/11  Updated: 01/Apr/14  Resolved: 01/Apr/14

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

Type: Improvement Priority: Major
Reporter: Petr Sobotka Assignee: Benjamin Eberlei
Resolution: Fixed Votes: 3
Labels: None
Environment:

Using Doctrine ORM 2.1.0BETA1



 Description   

I am trying to index a collection by its entity's column which is also a foreign key (association). It seems to me that it is not possible at the moment.

For example:

/**
 * @Entity
 */
class Hotel
{

    // $id column and other stuff

    /**
     * @oneToMany(targetEntity="Booking", mappedBy="hotel", indexBy="room")
     * @var Booking[]
     */
    private $bookings;
}

/**
 * @Entity
 */
class Booking
{
    /**
     * @var Hotel
     *
     * @Id 
     * @ManyToOne(targetEntity="Hotel", inversedBy="bookings")
     * @JoinColumns({
     *   @JoinColumn(name="hotel_id", referencedColumnName="id")
     * })
     */
    private $hotel;

    /**
     * @var Room
     *
     * @Id
     * @ManyToOne(targetEntity="Room")
     * @JoinColumns({
     *   @JoinColumn(name="room_id", referencedColumnName="id")
     * })
     */
    private $room;
}

Only possible workaround I found is to define another (plain) entity's property mapped to the same table column and index by it:

/**
 * @Entity
 */
class Hotel
{

    // $id column and other stuff

    /**
     * @oneToMany(targetEntity="Booking", mappedBy="hotel", indexBy="roomId")
     * @var Booking[]
     */
    private $bookings;
}

/**
 * @Entity
 */
class Booking
{
    // ...

    /**
     * @var Room
     *
     * @Id
     * @ManyToOne(targetEntity="Room")
     * @JoinColumns({
     *   @JoinColumn(name="room_id", referencedColumnName="id")
     * })
     */
    private $room;
    
    /**
     * @var integer $roomId
     *
     * @Column(name="room_id", type="integer", nullable=false)
     */
    private $roomId;
}

Wouldn't it be easy to support it?



 Comments   
Comment by Benjamin Eberlei [ 05/Jun/11 ]

It is not so easy to implement from the first gimplse and it is not a bug but an improvement/feature request.

Comment by Benjamin Morel [ 02/Mar/13 ]

Related PR: https://github.com/doctrine/doctrine2/pull/204

Comment by Benjamin Morel [ 30/Mar/14 ]

This seems to have been integrated now:
https://github.com/doctrine/doctrine2/pull/639

Should this be marked as resolved?

Comment by Petr Sobotka [ 01/Apr/14 ]

Resolved. Thanks!





[DDC-2262] [GH-559] [Paginator] Added support for order by scalar Created: 26/Jan/13  Updated: 01/Apr/14  Resolved: 27/Jan/13

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

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


 Description   

This issue is created automatically through a Github pull request on behalf of Stroitel:

Url: https://github.com/doctrine/doctrine2/pull/559

Message:



 Comments   
Comment by Benjamin Eberlei [ 27/Jan/13 ]

A related Github Pull-Request [GH-559] was closed
https://github.com/doctrine/doctrine2/pull/559

Comment by Doctrine Bot [ 01/Apr/14 ]

A related Github Pull-Request [GH-559] was closed:
https://github.com/doctrine/dbal/pull/559





[DDC-2266] [GH-562] Fix error in QueryBuilder example Created: 30/Jan/13  Updated: 01/Apr/14  Resolved: 05/Feb/13

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

Type: Documentation Priority: Trivial
Reporter: Benjamin Eberlei Assignee: Benjamin Eberlei
Resolution: Fixed Votes: 0
Labels: None


 Description   

This issue is created automatically through a Github pull request on behalf of vrana:

Url: https://github.com/doctrine/doctrine2/pull/562

Message:



 Comments   
Comment by Benjamin Eberlei [ 02/Feb/13 ]

A related Github Pull-Request [GH-562] was closed
https://github.com/doctrine/doctrine2/pull/562

Comment by Fabio B. Silva [ 05/Feb/13 ]

Merged : https://github.com/doctrine/doctrine2/commit/4651d92d634784d5d8d02af378afccb74935058c

Comment by Doctrine Bot [ 01/Apr/14 ]

A related Github Pull-Request [GH-562] was closed:
https://github.com/doctrine/dbal/pull/562





[DDC-2215] [GH-543] Make doctrine a Light-weight distribution package in Composer Created: 28/Dec/12  Updated: 14/Mar/14  Resolved: 19/Jan/13

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

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


 Description   

This issue is created automatically through a Github pull request on behalf of carlosbuenosvinos:

Url: https://github.com/doctrine/doctrine2/pull/543

Message:

In order to save space and bandwidth when installing doctrine using Composer, I have added .gitattributes removing files and folders unnecessary when using doctrine as a dependecy.

(extracted from http://getcomposer.org/doc/02-libraries.md#light-weight-distribution-packages)

Including the tests and other useless information like .travis.yml in distributed packages is not a good idea.

The .gitattributes file is a git specific file like .gitignore also living at the root directory of your library. It overrides local and global configuration (.git/config and ~/.gitconfig respectively) when present and tracked by git.

Use .gitattributes to prevent unwanted files from bloating the zip distribution packages.

// .gitattributes
/Tests export-ignore
phpunit.xml.dist export-ignore
Resources/doc/ export-ignore
.travis.yml export-ignore
Test it by inspecting the zip file generated manually:

git archive branchName --format zip -o file.zip

Note: Files would be still tracked by git just not included in the distribution. This will only work for GitHub packages installed from dist (i.e. tagged releases) for now.



 Comments   
Comment by Doctrine Bot [ 14/Mar/14 ]

A related Github Pull-Request [GH-543] was closed:
https://github.com/doctrine/dbal/pull/543





[DDC-2486] Getting started does not work with current release Created: 04/Jun/13  Updated: 12/Mar/14  Resolved: 11/Sep/13

Status: Resolved
Project: Doctrine 2 - ORM
Component/s: ORM
Affects Version/s: 2.3.4, 2.4.1
Fix Version/s: 2.4
Security Level: All

Type: Documentation Priority: Minor
Reporter: Julian Picht Assignee: Benjamin Eberlei
Resolution: Fixed Votes: 1
Labels: Cli
Environment:

Ubuntu 12.04



 Description   

The tutorial states: "This tutorial assumes you work with Doctrine 2.3 and above. Some of the code will not work with lower versions."

I'm using 2.3.4

When running "php vendor/bin/doctrine orm:schema-tool:create"

this happens:

PHP Fatal error: Call to undefined method Doctrine\ORM\Tools\Console\ConsoleRunner::createHelperSet() in /var/www/project/cli-config.php on line 5
PHP Stack trace:
PHP 1.

{main}() /var/www/project/vendor/doctrine/orm/bin/doctrine:0
PHP 2. include() /var/www/project/vendor/doctrine/orm/bin/doctrine:4
PHP 3. require() /var/www/project/vendor/doctrine/orm/bin/doctrine.php:31

Fatal error: Call to undefined method Doctrine\ORM\Tools\Console\ConsoleRunner::createHelperSet() in /var/www/project/cli-config.php on line 5

Call Stack:
0.0001 619840 1. {main}

() /var/www/project/vendor/doctrine/orm/bin/doctrine:0
0.0003 632072 2. include('/var/www/project/vendor/doctrine/orm/bin/doctrine.php') /var/www/project/vendor/doctrine/orm/bin/doctrine:4
0.0012 730208 3. require('/var/www/project/cli-config.php') /var/www/project/vendor/doctrine/orm/bin/doctrine.php:31

This is because some commits are not yet in the release. The current GIT version probably works but is not an option for me.



 Comments   
Comment by Benton Jackson [ 11/Jun/13 ]

I'm seeing this problem too. Kinda hard to learn Doctrine when the tutorial is brain dead.

Comment by Benton Jackson [ 11/Jun/13 ]

"CreateHelperSet" appears to be a method in 2.4. I adapted the "2.3 configuring the command line" code to make my "cli-config.php" file read like this, and it appears to work:

<?php
// cli-config.php
require_once "bootstrap.php";

$em = $entityManager;

$helperSet = new \Symfony\Component\Console\Helper\HelperSet(array(
'db' => new \Doctrine\DBAL\Tools\Console\Helper\ConnectionHelper($em->getConnection()),
'em' => new \Doctrine\ORM\Tools\Console\Helper\EntityManagerHelper($em)
));

Comment by Stephen Westman [ 23/Jun/13 ]

Thanks to Benton, I now have a working Doctrine app. I agree that it would be nice to have had this taken care of before release. However, as an old time guerrilla-type programmer, I can do "whatever works"!

Thanks again, Benton!

Comment by Mortensen Cristian [ 25/Aug/13 ]

Thanks Benton!

Comment by Benjamin Eberlei [ 11/Sep/13 ]

2.4 is now released and the tutorial works, sorry for the long disconnect

Comment by Vishal Bandre [ 03/Mar/14 ]

My working cli-config.php with latest fresh doctrine source as on Mar 03 2014.

Windows XP - Access doctrine without using php command like > vendor\bin\doctrine.

<?php // cli-config.php
use Doctrine\ORM\Tools\Console\ConsoleRunner;

// replace with file to your own project bootstrap
require_once 'bootstrap.php';

// replace with mechanism to retrieve EntityManager in your app
// $entityManager = GetEntityManager();

$em = $entityManager;
$helperSet = new \Symfony\Component\Console\Helper\HelperSet(array(
'db' => new \Doctrine\DBAL\Tools\Console\Helper\ConnectionHelper($em->getConnection()),
'em' => new \Doctrine\ORM\Tools\Console\Helper\EntityManagerHelper($em)
));
return ConsoleRunner::createHelperSet($em);

Comment by Igor Timoshenkov [ 11/Mar/14 ]

Hello, everyone.

I am trying to follow the Tutorial, but I am stuck with the cli generation. Here is my cli-config.php file:

<?php
use Doctrine\ORM\EntityManager;
use Doctrine\ORM\Tools\Console\ConsoleRunner;
use Doctrine\ORM\Tools\Setup;

require_once "vendor/autoload.php";

$modelsPath = realpath(_DIR_.'/../model');
$config = Setup::createAnnotationMetadataConfiguration(array($modelsPath), true);

// database configuration parameters
$conn = array(
'driver' => 'pdo_sqlite',
'host' => 'localhost',
'user' => 'root',
'password' => '',
'dbname' => 'someDb',
);

return ConsoleRunner::createHelperSet(EntityManager::create($conn, $config));

Now, when I run

php vendor/bin/doctrine orm:schema-tool:create
or
php vendor/bin/doctrine orm:schema-tool:drop

I get Access denied. What am I doing wrong?

P.S. I am not using Symfony, Doctrine version is 2.4.1.

Comment by Vishal Bandre [ 12/Mar/14 ]

Which db driver are you using?

If you are using sqlite the conn parameters to be used are user, password, path, memory as described on http://docs.doctrine-project.org/projects/doctrine-dbal/en/2.0.x/reference/configuration.html but your connection array is showing wrong settings (these are MYSQL specific). Please check required db driver and try again.

Comment by Marco Pivetta [ 12/Mar/14 ]

Igor Timoshenkov's question was solved at http://stackoverflow.com/q/22336256/347063

Basically, his vendor/bin/doctrine was broken, but running php vendor/doctrine/orm/bin/doctrine worked fine.

Comment by Igor Timoshenkov [ 12/Mar/14 ]

Hi, guys.

Igor Timoshenkov's question was solved at http://stackoverflow.com/q/22336256/347063

My question is not solved.

If you are using sqlite the conn parameters to be used are user, password, path, memory as described on http://docs.doctrine-project.org/projects/doctrine-dbal/en/2.0.x/reference/configuration.html but your connection array is showing wrong settings (these are MYSQL specific). Please check required db driver and try again.

I have corrected the configuration parameters - I needed pdo_mysql, not pdo_sqlite. But the php vendor/bin/doctrine orm:schema-tool:create is still not working. Any ideas what else could that be?

BTW, the link to the configuration should be added to the Tutorial.

Comment by Vishal Bandre [ 12/Mar/14 ]

Will you please share/paste full error message here?

Check for missing db password, etc.





[DDC-2198] [GH-536] add missed branch Created: 14/Dec/12  Updated: 07/Mar/14  Resolved: 16/Dec/12

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

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


 Description   

This issue is created automatically through a Github pull request on behalf of KonstantinKuklin:

Url: https://github.com/doctrine/doctrine2/pull/536

Message:



 Comments   
Comment by Benjamin Eberlei [ 16/Dec/12 ]

A related Github Pull-Request [GH-536] was closed
https://github.com/doctrine/doctrine2/pull/536

Comment by Doctrine Bot [ 07/Mar/14 ]

A related Github Pull-Request [GH-536] was closed:
https://github.com/doctrine/dbal/pull/536





[DDC-2187] [GH-531] use base events Created: 05/Dec/12  Updated: 21/Feb/14  Resolved: 24/Dec/12

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

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


 Description   

This issue is created automatically through a Github pull request on behalf of docteurklein:

Url: https://github.com/doctrine/doctrine2/pull/531

Message:

in consequence of https://github.com/doctrine/common/pull/222



 Comments   
Comment by Doctrine Bot [ 21/Feb/14 ]

A related Github Pull-Request [GH-531] was closed:
https://github.com/doctrine/dbal/pull/531





[DDC-2092] [GH-487] Fix DDC-2069 Created: 20/Oct/12  Updated: 16/Feb/14  Resolved: 08/Sep/13

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

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


 Description   

This issue is created automatically through a Github pull request on behalf of FabioBatSilva:

Url: https://github.com/doctrine/doctrine2/pull/487

Message:

http://www.doctrine-project.org/jira/browse/DDC-2069



 Comments   
Comment by Benjamin Eberlei [ 21/Oct/12 ]

A related Github Pull-Request [GH-487] was closed
https://github.com/doctrine/doctrine2/pull/487

Comment by Fabio B. Silva [ 21/Oct/12 ]

Merged

Comment by Doctrine Bot [ 16/Feb/14 ]

A related Github Pull-Request [GH-487] was closed:
https://github.com/doctrine/dbal/pull/487





[DDC-1998] Problem when deleting with EntityManager->remove($entity) Created: 28/Aug/12  Updated: 15/Feb/14  Resolved: 01/May/13

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

Type: Bug Priority: Minor
Reporter: victor Velkov Assignee: Benjamin Eberlei
Resolution: Fixed Votes: 0
Labels: None

Attachments: File DDC1998Test.php     File DDC1998Test1.php     File EwtTimestamp.php     File ProductTemplate.php    
Issue Links:
Duplicate
is duplicated by DDC-2176 Illegal offset type in isset or empty... Resolved

 Description   

The problem is when using EntityMamager->remove($entity). The Sql query generated doesn't convert the values of the ids according to the field type that is used in doc block annotation. After investigating I found that in Doctrine\DBAL\Connection the function delete doesn't support to receive as param the types of the ids to be given to the executeUpdate function which is called in it and supports them. (The types need to be provided from the persisters from which the delete is called).

I hope it make sense to you. I got that problem because I am using custom time stamp column type as id. And it converts the value of the field to time stamp string, which if not converted to the proper sql value is not recognised and the delete doesn't go trough.

As far as I can see it is something that was missed and hope it will be fixed soon.

If you have any questions please ask.
Also on request I can provide example code and the fix I have done for myself.



 Comments   
Comment by Fabio B. Silva [ 29/Aug/12 ]

Hi Victor

Could you attach/paste your custom type and entity please ?

Comment by victor Velkov [ 30/Aug/12 ]

Ok I have attached them. The EwtTimestamp is the custom type.

Comment by Marco Pivetta [ 17/Sep/12 ]

victor Velkov do you have a failing test case for this one?

Comment by victor Velkov [ 17/Sep/12 ]

Nope sorry haven't done any test cases for this one

Comment by Fabio B. Silva [ 23/Sep/12 ]

Hi Victor,

I can't reproduce, could you change the added test case and try to make it fails ?

Thanks

Comment by victor Velkov [ 26/Sep/12 ]

Sure will do it as soon as I can. Sorry I didn't answer sooner just was in a holiday

Comment by Fabio B. Silva [ 02/Oct/12 ]

Thanks Victor

Please let me know when you change the test

Comment by victor Velkov [ 02/Oct/12 ]

Sorry for the delay i have attached the test case (DDC1998Test1.php).

Comment by Fabio B. Silva [ 10/Oct/12 ]

Hi Victor,

Sorry for the delay to answer

I think that we can't fix it,
Your type requires sql conversion to work, and doctrine does not support @Id fields with sql conversion.

Comment by victor Velkov [ 11/Oct/12 ]

Really as far as i can see in the code you do convert them when you are executing an update. And the fix that i did for my self is to add 3rd parameter to the function delete in Doctrine\DBAL\Connection and then every where where it is called in the code which is in 2 places Doctrine\ORM\Persisters\BasicEntityPersister and Doctrine\ORM\JoinedSubclassPersister to give that parameter with the types. And as far as i can see you do that for the updates. After that in Connection delete you call the executeUpdate which supports the type and you just have to pass it along. And that is it.

Comment by Marco Pivetta [ 23/Jan/13 ]

Reducing priority. It is an edge case, and we already don't officially support custom object types as identifiers.

Comment by Benjamin Eberlei [ 01/May/13 ]

We should be able to support this I think, i don't see a reason it shouldnt work

Comment by Benjamin Eberlei [ 01/May/13 ]

Will be fixed in 2.4





[DDC-2181] [GH-528] Documentation fixes Created: 01/Dec/12  Updated: 14/Feb/14  Resolved: 23/Dec/12

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

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


 Description   

This issue is created automatically through a Github pull request on behalf of BenMorel:

Url: https://github.com/doctrine/doctrine2/pull/528

Message:

This is a first batch of documentation fixes:

  • Missing docblocks
  • Missing / incorrect `@param` / `@return` / `@throws` annotations
  • Missing newlines between annotations
  • Incorrect vertical alignment of `@param` annotations

I'm willing to make more documentation fixes on this project, but I'll wait for your feedback on this first batch before moving forward!

Let me know if you have any comment / suggestion / question.



 Comments   
Comment by Doctrine Bot [ 14/Feb/14 ]

A related Github Pull-Request [GH-528] was closed:
https://github.com/doctrine/dbal/pull/528





[DDC-2174] [GH-526] [DDC-2172] Fix EntityGenerator get literal type Created: 27/Nov/12  Updated: 11/Feb/14  Resolved: 27/Nov/12

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

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


 Description   

This issue is created automatically through a Github pull request on behalf of FabioBatSilva:

Url: https://github.com/doctrine/doctrine2/pull/526

Message:

http://www.doctrine-project.org/jira/browse/DDC-2172



 Comments   
Comment by Benjamin Eberlei [ 27/Nov/12 ]

A related Github Pull-Request [GH-526] was closed
https://github.com/doctrine/doctrine2/pull/526

Comment by Fabio B. Silva [ 27/Nov/12 ]

Merged : https://github.com/doctrine/doctrine2/commit/29f0b678cfb991e90af3eed023fb8c62ec8f7acf

Comment by Doctrine Bot [ 11/Feb/14 ]

A related Github Pull-Request [GH-526] was closed:
https://github.com/doctrine/dbal/pull/526





[DDC-2151] [GH-515] Fixes sandbox cli: The helper "em" is not defined. Created: 16/Nov/12  Updated: 08/Feb/14  Resolved: 25/Nov/12

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

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


 Description   

This issue is created automatically through a Github pull request on behalf of tranver:

Url: https://github.com/doctrine/doctrine2/pull/515

Message:

In afd8ea9 $helpers became an instance of HelperSet and caused an "The helper "em" is not defined." exception.



 Comments   
Comment by Benjamin Eberlei [ 25/Nov/12 ]

A related Github Pull-Request [GH-515] was closed
https://github.com/doctrine/doctrine2/pull/515

Comment by Doctrine Bot [ 08/Feb/14 ]

A related Github Pull-Request [GH-515] was closed:
https://github.com/doctrine/dbal/pull/515





[DDC-2127] [GH-506] Fix DDC-2121 Created: 06/Nov/12  Updated: 08/Feb/14  Resolved: 06/Nov/12

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

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


 Description   

This issue is created automatically through a Github pull request on behalf of FabioBatSilva:

Url: https://github.com/doctrine/doctrine2/pull/506

Message:

http://www.doctrine-project.org/jira/browse/DDC-2121



 Comments   
Comment by Benjamin Eberlei [ 06/Nov/12 ]

A related Github Pull-Request [GH-506] was closed
https://github.com/doctrine/doctrine2/pull/506

Comment by Fabio B. Silva [ 06/Nov/12 ]

Merged : https://github.com/doctrine/doctrine2/commit/262c3eea6bd4313d34558ff434bf9b8ff34b7ab3

Comment by Doctrine Bot [ 08/Feb/14 ]

A related Github Pull-Request [GH-506] was closed:
https://github.com/doctrine/dbal/pull/506





[DDC-2132] [GH-509] SchemaTool ignoring 'fixed' option Created: 07/Nov/12  Updated: 08/Feb/14  Resolved: 12/Nov/12

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

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


 Description   

This issue is created automatically through a Github pull request on behalf of smottt:

Url: https://github.com/doctrine/doctrine2/pull/509

Message:

If the column is set to fixed string length like this:

```php
<?php

/**

  • @ORM\Column(type="string", length=2, options= {"fixed" = true}

    )
    */
    protected $foo;
    ```

The schema tool will not detect that 'fixed' option correctly when generating update SQL.

Fix attached.



 Comments   
Comment by Benjamin Eberlei [ 07/Nov/12 ]

A related Github Pull-Request [GH-509] was closed
https://github.com/doctrine/doctrine2/pull/509

Comment by Doctrine Bot [ 08/Feb/14 ]

A related Github Pull-Request [GH-509] was closed:
https://github.com/doctrine/dbal/pull/509





[DDC-2142] [GH-513] Enumeration support Created: 13/Nov/12  Updated: 20/Jan/14  Resolved: 21/Nov/12

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

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


 Description   

This issue is created automatically through a Github pull request on behalf of FabioBatSilva:

Url: https://github.com/doctrine/doctrine2/pull/513

Message:

This patch adds support for ``@Enum``. https://github.com/doctrine/common/pull/167

Please let me know if there is another annotations where we can use ``@Enum``.



 Comments   
Comment by Benjamin Eberlei [ 15/Nov/12 ]

A related Github Pull-Request [GH-513] was closed
https://github.com/doctrine/doctrine2/pull/513

Comment by Fabio B. Silva [ 21/Nov/12 ]

Merged : https://github.com/doctrine/common/commit/30b8cea3bfe22f5eb58b5b0165f21df750aeb2e2

Comment by Doctrine Bot [ 20/Jan/14 ]

A related Github Pull-Request [GH-513] was closed:
https://github.com/doctrine/dbal/pull/513





[DDC-2679] SchemaTool ON DELETE CASCADE does not work with MSSQL Created: 13/Sep/13  Updated: 15/Jan/14

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

Type: Bug Priority: Major
Reporter: Flip Assignee: Benjamin Eberlei
Resolution: Unresolved Votes: 0
Labels: None
Environment:

MSSQL 2008 R2



 Description   

The following queries are produced by:
vendor\doctrine\orm\tests\Doctrine\Tests\ORM\Functional\SchemaTool\DDC214Test.php

ALTER TABLE company_persons ADD CONSTRAINT FK_820EDD048EEC5B5C FOREIGN KEY (spouse_id) REFERENCES company_persons (id) ON DELETE CASCADE
ALTER TABLE company_persons_friends ADD CONSTRAINT FK_EAD47FE9217BBB47 FOREIGN KEY (person_id) REFERENCES company_persons (id) ON DELETE CASCADE
ALTER TABLE company_persons_friends ADD CONSTRAINT FK_EAD47FE96A5458E8 FOREIGN KEY (friend_id) REFERENCES company_persons (id) ON DELETE CASCADE
ALTER TABLE company_employees ADD CONSTRAINT FK_899949F0BF396750 FOREIGN KEY (id) REFERENCES company_persons (id) ON DELETE CASCADE
ALTER TABLE company_managers ADD CONSTRAINT FK_B1DEF56BBF396750 FOREIGN KEY (id) REFERENCES company_persons (id) ON DELETE CASCADE
ALTER TABLE company_auctions ADD CONSTRAINT FK_6A41FC6DBF396750 FOREIGN KEY (id) REFERENCES company_events (id) ON DELETE CASCADE
ALTER TABLE company_raffles ADD CONSTRAINT FK_9D157F46BF396750 FOREIGN KEY (id) REFERENCES company_events (id) ON DELETE CASCADE

The errors:

Msg 1785, Level 16, State 0, Line 1
Introducing FOREIGN KEY constraint 'FK_820EDD048EEC5B5C' on table 'company_persons' may cause cycles or multiple cascade paths. Specify ON DELETE NO ACTION or ON UPDATE NO ACTION, or modify other FOREIGN KEY constraints.
Msg 1750, Level 16, State 0, Line 1
Could not create constraint. See previous errors.
Msg 2714, Level 16, State 5, Line 1
There is already an object named 'FK_EAD47FE9217BBB47' in the database.
Msg 1750, Level 16, State 0, Line 1
Could not create constraint. See previous errors.
Msg 1785, Level 16, State 0, Line 1
Introducing FOREIGN KEY constraint 'FK_EAD47FE96A5458E8' on table 'company_persons_friends' may cause cycles or multiple cascade paths. Specify ON DELETE NO ACTION or ON UPDATE NO ACTION, or modify other FOREIGN KEY constraints.
Msg 1750, Level 16, State 0, Line 1
Could not create constraint. See previous errors.
Msg 2714, Level 16, State 5, Line 1
There is already an object named 'FK_899949F0BF396750' in the database.
Msg 1750, Level 16, State 0, Line 1
Could not create constraint. See previous errors.
Msg 2714, Level 16, State 5, Line 1
There is already an object named 'FK_B1DEF56BBF396750' in the database.
Msg 1750, Level 16, State 0, Line 1
Could not create constraint. See previous errors.
Msg 2714, Level 16, State 5, Line 1
There is already an object named 'FK_6A41FC6DBF396750' in the database.
Msg 1750, Level 16, State 0, Line 1
Could not create constraint. See previous errors.
Msg 2714, Level 16, State 5, Line 1
There is already an object named 'FK_9D157F46BF396750' in the database.
Msg 1750, Level 16, State 0, Line 1
Could not create constraint. See previous errors.

An explanation why this is happening:
http://stackoverflow.com/questions/851625/foreign-key-constraint-may-cause-cycles-or-multiple-cascade-paths



 Comments   
Comment by Steve Müller [ 15/Jan/14 ]

This is a SQL Server limitation as it does not support multi-path cascades for foreign keys.
See here: http://allyourdatabase.blogspot.de/2006/11/multiple-cascade-paths-error-in-sql.html

Not sure what to do about this at the moment...

Comment by Flip [ 15/Jan/14 ]

Yes there is nothing we can do to get this to work. But what we can do is:
1. Build in some detection when this happens and then throw a php exception for this kind of error (yet to be created)
2. All tests which rely on this functionality for SQL Server should be reviewed again. There are two possibilities:
A. The test can be rewritten so that it doesn't have multiple paths.
B. if not. The test has to be skipped for SQL Server.





[DDC-2137] [GH-510] CS on QueryBuilder Created: 12/Nov/12  Updated: 14/Jan/14  Resolved: 12/Nov/12

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

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


 Description   

This issue is created automatically through a Github pull request on behalf of ruian:

Url: https://github.com/doctrine/doctrine2/pull/510

Message:



 Comments   
Comment by Benjamin Eberlei [ 12/Nov/12 ]

A related Github Pull-Request [GH-510] was closed
https://github.com/doctrine/doctrine2/pull/510

Comment by Doctrine Bot [ 14/Jan/14 ]

A related Github Pull-Request [GH-510] was closed:
https://github.com/doctrine/dbal/pull/510





[DDC-2117] [GH-499] Speling: "invidiual" -> "individual" Created: 02/Nov/12  Updated: 07/Jan/14  Resolved: 05/Nov/12

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

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


 Description   

This issue is created automatically through a Github pull request on behalf of md2perpe:

Url: https://github.com/doctrine/doctrine2/pull/499

Message:

Just in a phpdoc comment, but should be corrected anyway.



 Comments   
Comment by Benjamin Eberlei [ 02/Nov/12 ]

A related Github Pull-Request [GH-499] was closed
https://github.com/doctrine/doctrine2/pull/499

Comment by Fabio B. Silva [ 05/Nov/12 ]

Merged : https://github.com/doctrine/doctrine2/commit/409516e86c83d5e8ce42fc7960b27abbdeb8b29b

Comment by Doctrine Bot [ 07/Jan/14 ]

A related Github Pull-Request [GH-499] was closed:
https://github.com/doctrine/dbal/pull/499





[DDC-2098] [GH-491] remove unused classes Created: 23/Oct/12  Updated: 05/Jan/14  Resolved: 24/Oct/12

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

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


 Description   

This issue is created automatically through a Github pull request on behalf of eventhorizonpl:

Url: https://github.com/doctrine/doctrine2/pull/491

Message:

Hi,

This patch removes unused use statements.

Best regards,
Michal



 Comments   
Comment by Benjamin Eberlei [ 24/Oct/12 ]

A related Github Pull-Request [GH-491] was closed
https://github.com/doctrine/doctrine2/pull/491

Comment by Fabio B. Silva [ 24/Oct/12 ]

Merged : https://github.com/doctrine/doctrine2/commit/f5c1b38e2d03dd6428e9ceb3d27e6bba55a0f337

Comment by Doctrine Bot [ 05/Jan/14 ]

A related Github Pull-Request [GH-491] was closed:
https://github.com/doctrine/dbal/pull/491





[DDC-2101] [GH-492] Added NOT LIKE expression Created: 25/Oct/12  Updated: 05/Jan/14  Resolved: 27/Oct/12

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

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


 Description   

This issue is created automatically through a Github pull request on behalf of hason:

Url: https://github.com/doctrine/doctrine2/pull/492

Message:



 Comments   
Comment by Benjamin Eberlei [ 27/Oct/12 ]

A related Github Pull-Request [GH-492] was closed
https://github.com/doctrine/doctrine2/pull/492

Comment by Fabio B. Silva [ 27/Oct/12 ]

Merged : https://github.com/doctrine/doctrine2/commit/98c5b34f2b40fd04cf891052514f01f513077405

Comment by Doctrine Bot [ 05/Jan/14 ]

A related Github Pull-Request [GH-492] was closed:
https://github.com/doctrine/dbal/pull/492





[DDC-2062] [GH-466] Use `protected` so EntityGenerator can be extended Created: 09/Oct/12  Updated: 05/Jan/14  Resolved: 12/Nov/12

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

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


 Description   

This issue is created automatically through a Github pull request on behalf of ethanresnick:

Url: https://github.com/doctrine/doctrine2/pull/466

Message:

This is definitely something I'd like to be able to extend, and I imagine others might too.



 Comments   
Comment by Doctrine Bot [ 05/Jan/14 ]

A related Github Pull-Request [GH-466] was closed:
https://github.com/doctrine/dbal/pull/466





[DDC-2108] [GH-493] Do not add trailing whitespace to blank lines Created: 30/Oct/12  Updated: 04/Jan/14  Resolved: 06/Nov/12

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

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


 Description   

This issue is created automatically through a Github pull request on behalf of nmpolo:

Url: https://github.com/doctrine/doctrine2/pull/493

Message:

This change prevents spaces from being added to blank lines so PHP Code Sniffer doesn't generate errors when using PSR2 standards.



 Comments   
Comment by Benjamin Eberlei [ 06/Nov/12 ]

A related Github Pull-Request [GH-493] was closed
https://github.com/doctrine/doctrine2/pull/493

Comment by Fabio B. Silva [ 06/Nov/12 ]

Merged : https://github.com/doctrine/doctrine2/commit/a44579303ca2a358d9e98127e158fc5fa5c5cb1e

Comment by Doctrine Bot [ 04/Jan/14 ]

A related Github Pull-Request [GH-493] was closed:
https://github.com/doctrine/dbal/pull/493





[DDC-2094] [GH-488] Fix DDC-2079 Created: 20/Oct/12  Updated: 03/Jan/14  Resolved: 08/Sep/13

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

Type: Bug Priority: Major
Reporter: Benjamin Eberlei Assignee: Fabio B. Silva
Resolution: Fixed Votes: 0
Labels: None


 Description   

This issue is created automatically through a Github pull request on behalf of FabioBatSilva:

Url: https://github.com/doctrine/doctrine2/pull/488

Message:

http://www.doctrine-project.org/jira/browse/DDC-2079



 Comments   
Comment by Benjamin Eberlei [ 21/Oct/12 ]

A related Github Pull-Request [GH-488] was closed
https://github.com/doctrine/doctrine2/pull/488

Comment by Fabio B. Silva [ 21/Oct/12 ]

Merged

Comment by Doctrine Bot [ 03/Jan/14 ]

A related Github Pull-Request [GH-488] was closed:
https://github.com/doctrine/dbal/pull/488





[DDC-2040] [GH-453] Added missing exit codes in commands Created: 24/Sep/12  Updated: 03/Jan/14  Resolved: 25/Oct/12

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

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


 Description   

This issue is created automatically through a Github pull request on behalf of hason:

Url: https://github.com/doctrine/doctrine2/pull/453

Message:



 Comments   
Comment by Fabio B. Silva [ 25/Oct/12 ]

Closed in favor of https://github.com/doctrine/doctrine2/pull/489

Comment by Benjamin Eberlei [ 03/Nov/12 ]

A related Github Pull-Request [GH-489] was closed
https://github.com/doctrine/doctrine2/pull/489

Comment by Doctrine Bot [ 21/Dec/13 ]

A related Github Pull-Request [GH-453] was closed:
https://github.com/doctrine/dbal/pull/453

Comment by Doctrine Bot [ 03/Jan/14 ]

A related Github Pull-Request [GH-489] was closed:
https://github.com/doctrine/dbal/pull/489





[DDC-2095] [GH-489] Fixed coding standards in the Tools namespace Created: 22/Oct/12  Updated: 03/Jan/14  Resolved: 08/Sep/13

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

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


 Description   

This issue is created automatically through a Github pull request on behalf of stof:

Url: https://github.com/doctrine/doctrine2/pull/489

Message:

This also fixes some command exit code in case of failure and removes an unused private method



 Comments   
Comment by Benjamin Eberlei [ 03/Nov/12 ]

A related Github Pull-Request [GH-489] was closed
https://github.com/doctrine/doctrine2/pull/489

Comment by Doctrine Bot [ 03/Jan/14 ]

A related Github Pull-Request [GH-489] was closed:
https://github.com/doctrine/dbal/pull/489





[DDC-2097] [GH-490] fix StatementMock bindParam parameters Created: 22/Oct/12  Updated: 03/Jan/14  Resolved: 24/Oct/12

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

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


 Description   

This issue is created automatically through a Github pull request on behalf of eventhorizonpl:

Url: https://github.com/doctrine/doctrine2/pull/490

Message:

Hi,

This patch fixes

PHP Fatal error: Declaration of Doctrine\Tests\Mocks\StatementMock::bindParam() must be compatible with Doctrine\DBAL\Driver\Statement::bindParam($column, &$variable, $type = NULL, $length = NULL) in /home/michal/projekty/doctrine2/tests/Doctrine/Tests/Mocks/StatementMock.php on line 11

Best regards,
Michal



 Comments   
Comment by Benjamin Eberlei [ 23/Oct/12 ]

A related Github Pull-Request [GH-490] was closed
https://github.com/doctrine/doctrine2/pull/490

Comment by Fabio B. Silva [ 24/Oct/12 ]

Merged : https://github.com/doctrine/doctrine2/commit/e9c7deae4fa95fd24e106d97a7c83bcf9d2faaed

Comment by Doctrine Bot [ 03/Jan/14 ]

A related Github Pull-Request [GH-490] was closed:
https://github.com/doctrine/dbal/pull/490





[DDC-2091] [GH-486] Fix DDC-2084 Created: 20/Oct/12  Updated: 31/Dec/13  Resolved: 21/Nov/12

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

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


 Description   

This issue is created automatically through a Github pull request on behalf of FabioBatSilva:

Url: https://github.com/doctrine/doctrine2/pull/486

Message:

http://www.doctrine-project.org/jira/browse/DDC-2084



 Comments   
Comment by Fabio B. Silva [ 21/Nov/12 ]

Merged : https://github.com/doctrine/doctrine2/commit/d6d5c341e220ff7aec50c8ecabd5d0b8be2e0804

Comment by Doctrine Bot [ 31/Dec/13 ]

A related Github Pull-Request [GH-486] was closed:
https://github.com/doctrine/dbal/pull/486