[DDC-1613] Add Pagination Tools Created: 22/Jan/12  Updated: 22/Jan/12  Resolved: 22/Jan/12

Status: Resolved
Project: Doctrine 2 - ORM
Component/s: None
Affects Version/s: None
Fix Version/s: 2.2.0-RC1, 2.2
Security Level: All

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


 Description   

We should add pagination tools to the Doctrine\ORM\Tools\Pagination namespace. There are already 3 libraries out there that share the same code-base:

We should merge the currently best one of this into the code soon, as the cost of maintaining them is very high and their code is pretty stable by now.



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

Implemented, using the KNP Code, the PAgerfanta tests and putting a set of functional tests on top.

Merged back into 2.2 aswell as the code can be considered stable and does not affect any other area of the code.





[DDC-1612] Cannot call entityManager->flush($entity) with new entity Created: 19/Jan/12  Updated: 22/Jan/12  Resolved: 21/Jan/12

Status: Resolved
Project: Doctrine 2 - ORM
Component/s: ORM
Affects Version/s: 2.2-BETA1, 2.2-BETA2, Git Master
Fix Version/s: 2.2.0-RC1, 2.2
Security Level: All

Type: Bug Priority: Major
Reporter: Sascha-Oliver Prolic Assignee: Benjamin Eberlei
Resolution: Fixed Votes: 0
Labels: None


 Description   

Following works:
$entity = $em->find('Entity', 1);
$entity->setName('newName');
$em->persist($entity);
$em->flush($entity);

Following does NOT work:
$entity = new Entity();
$entity->setName('newName');
$em->persist($entity);
$em->flush($entity);



 Comments   
Comment by Benjamin Eberlei [ 21/Jan/12 ]

Fixed





[DDC-1609] Weird testerror on PostgreSQL Created: 18/Jan/12  Updated: 22/Jan/12  Resolved: 18/Jan/12

Status: Resolved
Project: Doctrine 2 - ORM
Component/s: None
Affects Version/s: 2.2-BETA1, 2.2-BETA2
Fix Version/s: 2.2.0-RC1, 2.2
Security Level: All

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


 Description   

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

Git Bisect found this commit to lead to the following error:

$ phpunit -c postgresql.phpunit.xml --filter DDC-742
PHPUnit 3.6.5 by Sebastian Bergmann.

Configuration read from /home/benny/code/php/wsnetbeans/doctrine2/postgresql.phpunit.xml

E

Time: 12 seconds, Memory: 36.00Mb

There was 1 error:

1) Doctrine\Tests\ORM\Functional\Ticket\DDC742Test::testIssue
Exception: [PHPUnit_Framework_Error_Notice] Undefined index: 0000000016f5d67f000000001fa7794e

With queries:
11. SQL: 'INSERT INTO comments (content) VALUES (?)' Params: 'baz'
10. SQL: 'INSERT INTO comments (content) VALUES (?)' Params: 'bar'
9. SQL: 'INSERT INTO comments (content) VALUES (?)' Params: 'foo'
8. SQL: 'ALTER TABLE user_comments ADD CONSTRAINT FK_BF13722AF8697D13 FOREIGN KEY (comment_id) REFERENCES comments (id) NOT DEFERRABLE INITIALLY IMMEDIATE' Params: 
7. SQL: 'ALTER TABLE user_comments ADD CONSTRAINT FK_BF13722AA76ED395 FOREIGN KEY (user_id) REFERENCES users (id) NOT DEFERRABLE INITIALLY IMMEDIATE' Params: 
6. SQL: 'CREATE TABLE comments (id SERIAL NOT NULL, content VARCHAR(100) NOT NULL, PRIMARY KEY(id))' Params: 
5. SQL: 'CREATE INDEX IDX_BF13722AF8697D13 ON user_comments (comment_id)' Params: 
4. SQL: 'CREATE INDEX IDX_BF13722AA76ED395 ON user_comments (user_id)' Params: 
3. SQL: 'CREATE TABLE user_comments (user_id INT NOT NULL, comment_id INT NOT NULL, PRIMARY KEY(user_id, comment_id))' Params: 
2. SQL: 'CREATE TABLE users (id SERIAL NOT NULL, title VARCHAR(100) NOT NULL, PRIMARY KEY(id))' Params: 

Trace:
/home/benny/code/php/wsnetbeans/doctrine2/lib/Doctrine/ORM/UnitOfWork.php:2171
/home/benny/code/php/wsnetbeans/doctrine2/lib/Doctrine/ORM/Persisters/ManyToManyPersister.php:113
/home/benny/code/php/wsnetbeans/doctrine2/lib/Doctrine/ORM/Persisters/ManyToManyPersister.php:95
/home/benny/code/php/wsnetbeans/doctrine2/lib/Doctrine/ORM/Persisters/AbstractCollectionPersister.php:130
/home/benny/code/php/wsnetbeans/doctrine2/lib/Doctrine/ORM/Persisters/AbstractCollectionPersister.php:108
/home/benny/code/php/wsnetbeans/doctrine2/lib/Doctrine/ORM/UnitOfWork.php:310
/home/benny/code/php/wsnetbeans/doctrine2/lib/Doctrine/ORM/EntityManager.php:334
/home/benny/code/php/wsnetbeans/doctrine2/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC742Test.php:63


/home/benny/code/php/wsnetbeans/doctrine2/tests/Doctrine/Tests/OrmFunctionalTestCase.php:359


 Comments   
Comment by Benjamin Eberlei [ 18/Jan/12 ]

This error depends on the caching layer. Without APC/Memcache this test works for me, not with cache. But it only happens on PGSQL not on MySQL or SQLITE

Comment by Benjamin Eberlei [ 18/Jan/12 ]

It specifically depends on the Memcache driver, test works with APC

Comment by Benjamin Eberlei [ 18/Jan/12 ]

Fixed





[DDC-1606] Added fix for collection->contains with many-to-many extra lazy fetchMode Created: 17/Jan/12  Updated: 22/Jan/12  Resolved: 17/Jan/12

Status: Resolved
Project: Doctrine 2 - ORM
Component/s: None
Affects Version/s: None
Fix Version/s: 2.2.0-RC1, 2.2, 2.3
Security Level: All

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


 Description   

That case previously triggered a PHP error along the lines of:

Notice: Undefined index: 0000000062a3a7690000000033c91b26 in doctrine/lib/Doctrine/ORM/UnitOfWork.php line 2202
#0 doctrine/lib/Doctrine/ORM/Persisters/ManyToManyPersister.php(267): Doctrine\ORM\UnitOfWork->getEntityIdentifier(Object(Item))
#1 doctrine/lib/Doctrine/ORM/PersistentCollection.php(411): Doctrine\ORM\Persisters\ManyToManyPersister->contains(Object(Doctrine\ORM\PersistentCollection), Object(Item))
#2 Test.php(71): Doctrine\ORM\PersistentCollection->contains(Object(Item))

Associated PR: https://github.com/doctrine/doctrine2/pull/259



 Comments   
Comment by Guilherme Blanco [ 17/Jan/12 ]

Merged in https://github.com/doctrine/doctrine2/commit/c1012f79706491e9dbf6c8741225b62833c6d2ce





[DDC-1604] Implement Common Proxy Created: 16/Jan/12  Updated: 22/Jan/12  Resolved: 16/Jan/12

Status: Resolved
Project: Doctrine 2 - ORM
Component/s: ORM
Affects Version/s: 2.2-BETA1, 2.2-BETA2
Fix Version/s: 2.2.0-RC1, 2.2
Security Level: All

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


 Comments   
Comment by Benjamin Eberlei [ 16/Jan/12 ]

done





[DDC-1603] Unique key name isn't correctly set Created: 16/Jan/12  Updated: 22/Jan/12  Resolved: 17/Jan/12

Status: Resolved
Project: Doctrine 2 - ORM
Component/s: Tools
Affects Version/s: 2.2-BETA2
Fix Version/s: 2.1.6, 2.2.0-RC1, 2.2, 2.3

Type: Bug Priority: Minor
Reporter: Thomas Tourlourat - Armetiz Assignee: Guilherme Blanco
Resolution: Fixed Votes: 0
Labels: None


 Description   

Example :

<unique-constraints>
<unique-constraint columns="permalink" />
<unique-constraint columns="code" />
</unique-constraints>

This will create :
CREATE UNIQUE INDEX UNIQ_6C3BF144F286BC32 ON shows (permalink);
CREATE UNIQUE INDEX 1 ON shows (code);

instead of :
CREATE UNIQUE INDEX UNIQ_6C3BF144F286BC32 ON shows (permalink);
CREATE UNIQUE INDEX UNIQ_6C3BF14477153098 ON shows (code);

The problem comme from SchemaTool, and the first key is a valid result because of "==" instead of "===" inside Table.php.

I have create a PR on Github.



 Comments   
Comment by Thomas Tourlourat - Armetiz [ 16/Jan/12 ]

Here the PR for the ORM SchemaTool : https://github.com/doctrine/doctrine2/pull/261
Here the PR for the DBAL Table : https://github.com/doctrine/dbal/pull/94

Comment by Guilherme Blanco [ 17/Jan/12 ]

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

Comment by Benjamin Eberlei [ 21/Jan/12 ]

DBAL merged back into 2.2 and 2.1.x

Comment by Benjamin Eberlei [ 21/Jan/12 ]

and Merged into 2.2 and 2.1.x ORM





Generated at Tue Sep 16 01:06:25 UTC 2014 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.