[DDC-1958] pager produces wrong results on postgresql Created: 30/Jul/12 Updated: 09/Apr/13 Resolved: 12/Nov/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | Tools |
| Affects Version/s: | 2.3 |
| Fix Version/s: | 2.3.1 |
| Security Level: | All |
| Type: | Bug | Priority: | Major |
| Reporter: | Miha Vrhovnik | Assignee: | Benjamin Eberlei |
| Resolution: | Fixed | Votes: | 1 |
| Labels: | paginator | ||
| Environment: |
|
||
| Description |
|
The query build by pager to get the subset of PKs to fetch produces wrong results on potgresql (and probably any database), that conforms to the SQL standard. The standard says, that if you wish to have the results in specific order, then you have to specify that by using an ORDER BY clause. If such a clause is not present the database can return the results in whatever order it sees fit. Testcase fixtures:
CREATE TABLE test (
id integer,
name text
);
INSERT INTO test VALUES (1, 'c');
INSERT INTO test VALUES (2, 'a');
INSERT INTO test VALUES (3, 'e');
INSERT INTO test VALUES (4, 'b');
INSERT INTO test VALUES (5, 'd');
INSERT INTO test VALUES (6, 'a');
INSERT INTO test VALUES (7, 'g');
INSERT INTO test VALUES (8, 'h');
INSERT INTO test VALUES (9, 'e');
INSERT INTO test VALUES (10, 'j');
Passing f.e.
$qb = $this->repository
->createQueryBuilder('t')
->select('t')
->setFirstResult(0)
->setMaxResults(5)
->addOrderBy('t.name', 'ASC')
to pager produces SQL like this modified for readability
SELECT DISTINCT id FROM (
SELECT id, name FROM test ORDER BY name
) dctrn_result
LIMIT 5 OFFSET 0
Now there is nothing wrong with this modified query per se, but there is no ORDER BY clause in the outer query so according to the standard the DB can choose whatever order it seems fit. Now mysql chooses the same order, but postgresql does not and it's probably not the only DB doing so. If you are interested in the results, this is the output I'm seeing:
I and my coworker came to the standard compliant solution it was also tested on the dataset above on both postgresql and mysql and it produced equal results. We have found only one corner case this won't work and IMHO that can't be fixed. The problem is when you do a sort on a field from a table that is in 1:n relation to the main table.. e.g tables posts and tags, where one post can have a multiple tags and you want your results sorted by a tag. Recipe for a correct query is:
so if I take the example from above the SQL should look like this:
SELECT id FROM (
SELECT DISTINCT id, name FROM (
SELECT id, name FROM test
) dctrn_result_inner
ORDER BY name, id LIMIT 5 OFFSET 0
) dctrn_result
|
| Comments |
| Comment by Jean-Philippe THEVENOUX [ 08/Nov/12 ] |
|
I reproduce same problem with Postgres 7.4, Doctrine 2.3 whereas with doctrine 2.2, all is fine |
| Comment by Raymond Kolbe [ 09/Apr/13 ] |
|
http://www.doctrine-project.org/jira/browse/DDC-1800 This relates. I just published a PR for an Oracle fix, but your solution appears to work for Oracle as well (issue is the same). |
[DDC-2182] [GH-529] Options join columns Created: 01/Dec/12 Updated: 04/Dec/12 Resolved: 04/Dec/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 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 francisbesset: Url: https://github.com/doctrine/doctrine2/pull/529 Message: When a columns as the options with unsigned at true, this options is not passed to the joinColumn. |
[DDC-2172] GENERATOR_TYPE_UUID missing in EntityGenerator.php Created: 27/Nov/12 Updated: 27/Nov/12 Resolved: 27/Nov/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | ORM |
| Affects Version/s: | None |
| Fix Version/s: | 2.4, 2.3.1 |
| Security Level: | All |
| Type: | Bug | Priority: | Major |
| Reporter: | Paul R | Assignee: | Fabio B. Silva |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Codeigniter 2 |
||
| Description |
|
Hey guys! In my model I used UUID as the generator strategy for my id: Looking at the EntityGenerator.php I saw that the UUID type is not (yet?) in there. When I add it to the function getIdGeneratorTypeString() everything works fine... |
| Comments |
| Comment by Fabio B. Silva [ 27/Nov/12 ] |
|
Fixed : https://github.com/doctrine/doctrine2/commit/29f0b678cfb991e90af3eed023fb8c62ec8f7acf |
[DDC-2174] [GH-526] [DDC-2172] Fix EntityGenerator get literal type Created: 27/Nov/12 Updated: 27/Nov/12 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 |
| Comment by Fabio B. Silva [ 27/Nov/12 ] |
|
Merged : https://github.com/doctrine/doctrine2/commit/29f0b678cfb991e90af3eed023fb8c62ec8f7acf |
[DDC-2074] ManyToManyPersister not found in the chain configured namespaces Created: 12/Oct/12 Updated: 25/Nov/12 Resolved: 25/Nov/12 |
|
| Status: | Closed |
| Project: | Doctrine 2 - ORM |
| Component/s: | ORM |
| Affects Version/s: | 2.2.3 |
| Fix Version/s: | 2.3.1 |
| Security Level: | All |
| Type: | Bug | Priority: | Major |
| Reporter: | Steffan Harries | Assignee: | Benjamin Eberlei |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Symfony 2.1 |
||
| Description |
|
The error is: "The class 'Doctrine\ORM\Persisters\ManyToManyPersister' was not found in the chain configured namespaces" Replicate by making an entity which has a property which is self referencing; e.g. http://docs.doctrine-project.org/en/latest/reference/association-mapping.html#many-to-many-self-referencing . For example an Album could be related to any other similar albums. An album entity would have a property 'relatedAlbums' which is an ArrayCollection. Similarly, I could be working on a CMS where any piece of content could be related to any other in order to show a "related content" or "related posts" style list on a web page. Using Symfony 2.1 and a Symfony Form with FormBuilder make sure to use the 'by_reference' => false to call the setter for the property. In the setter for the property: https://gist.github.com/3879169 A similar question has been asked on StackOverflow: http://stackoverflow.com/questions/12077084/doctrine2-manytomany-self-referencing |
| Comments |
| Comment by Benjamin Eberlei [ 12/Oct/12 ] |
|
I need a stacktrace for this error, i have no clue why this happens and where. |
| Comment by Steffan Harries [ 15/Oct/12 ] |
|
Stack Trace: The class 'Doctrine\ORM\Persisters\ManyToManyPersister' was not found in the chain configured namespaces Gedmo\Tree\Entity, Gedmo\Translatable\Entity, MyProject\Bundle\AdminBundle\Entity, MyProject\Bundle\Common\SiteBundle\Entity, MyProject\Bundle\Common\ContentBundle\Entity, FOS\UserBundle\Entity 500 Internal Server Error - MappingException Stack Trace in /opt/local/apache2/htdocs/projects/my-project/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/MappingException.php at line 38 at MappingException ::classNotFoundInNamespaces ('Doctrine\ORM\Persisters\ManyToManyPersister', array('Gedmo\Tree\Entity', 'Gedmo\Translatable\Entity', 'MyProject\Bundle\AdminBundle\Entity', 'MyProject\Bundle\Common\SiteBundle\Entity', 'MyProject\Bundle\Common\ContentBundle\Entity', 'FOS\UserBundle\Entity')) |
| Comment by Benjamin Eberlei [ 25/Nov/12 ] |
|
Ok apparently this is fixed |
[DDC-2168] [GH-523] [DDC-2074] Bugfix regarding clearing cloned PersistentCollections Created: 25/Nov/12 Updated: 25/Nov/12 Resolved: 25/Nov/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 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 jankramer: Url: https://github.com/doctrine/doctrine2/pull/523 Message: When calling clear on a PC that has no owner (e.g. because it was cloned), it can't be deleted as there is no metadata available (that's essentially the exception mentioned in the ticket). In these cases, I think it shouldn't be scheduled for deletion, but please have a look as my knowledge of the ORM internals is limited. |
| Comments |
| Comment by Benjamin Eberlei [ 25/Nov/12 ] |
|
A related Github Pull-Request [GH-523] was closed |
[DDC-2158] [GH-518] regression fix for left joins (double ON) Created: 20/Nov/12 Updated: 25/Nov/12 Resolved: 25/Nov/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 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 Fran6co: Url: https://github.com/doctrine/doctrine2/pull/518 Message: |
| Comments |
| Comment by Benjamin Eberlei [ 25/Nov/12 ] |
|
A related Github Pull-Request [GH-518] was closed |
[DDC-2144] PersistentCollection Criteria IS NULL not behaving as expected Created: 14/Nov/12 Updated: 14/Nov/12 Resolved: 14/Nov/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | ORM |
| Affects Version/s: | 2.3 |
| Fix Version/s: | 2.3.1 |
| Type: | Bug | Priority: | Major |
| Reporter: | Aitor Suso | Assignee: | Benjamin Eberlei |
| Resolution: | Invalid | Votes: | 0 |
| Labels: | None | ||
| Description |
|
When using the matching method of a persistentCollection with a Criteria that contains a call to isNull, the SQL generated contains "field = null" instead of "field IS null" |
| Comments |
| Comment by Aitor Suso [ 14/Nov/12 ] |
|
Seen that the code is fixed in the 2.3 branch, but it isn't in the last stable release (2.3.0) |
[DDC-2109] Duplicate joinTableColumns mapping for ManyToMany with resolve target entity Created: 31/Oct/12 Updated: 12/Nov/12 Resolved: 12/Nov/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | ORM |
| Affects Version/s: | 2.3 |
| Fix Version/s: | 2.3.1 |
| Security Level: | All |
| Type: | Bug | Priority: | Major |
| Reporter: | Michaël Gallego | Assignee: | Benjamin Eberlei |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
OS X 10.8 |
||
| Attachments: |
|
| Description |
|
I use the resolve target entity listener quite often for generic code. However I found an issue with ManyToMany relationships, when the target entity is modified by the listener. The problem is that the _validateAndCompleteManyToManyMapping in PersistentCollection duplicate the joinTableColumns, so this means that when creating an entity, Doctrine send twice the number of parameters, which of course fail. Here is a test that reproduce the problem. public function testAssertTableColumnsAreNotAddedInManyToMany() { $evm = $this->em->getEventManager(); $this->listener->addResolveTargetEntity( 'Doctrine\Tests\ORM\Tools\ResolveTargetInterface', 'Doctrine\Tests\ORM\Tools\ResolveTargetEntity', array() ); $this->listener->addResolveTargetEntity( 'Doctrine\Tests\ORM\Tools\TargetInterface', 'Doctrine\Tests\ORM\Tools\TargetEntity', array() ); $evm->addEventListener(Events::loadClassMetadata, $this->listener); $cm = $this->factory->getMetadataFor('Doctrine\Tests\ORM\Tools\ResolveTargetEntity'); $meta = $cm->associationMappings['manyToMany']; $this->assertSame('Doctrine\Tests\ORM\Tools\TargetEntity', $meta['targetEntity']); $this->assertEquals(array('resolvetargetentity_id', 'targetinterface_id'), $meta['joinTableColumns']); } |
[DDC-2129] [GH-508] Fix and test for DDC-2073 Created: 06/Nov/12 Updated: 12/Nov/12 Resolved: 12/Nov/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 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 mnapoli: Url: https://github.com/doctrine/doctrine2/pull/508 Message: Fix and test for Ticket extract: > PersistentCollection::matching() always returns empty collection, when passed criteria's expression is created using ExpressionBuilder::isNull() |
| Comments |
| Comment by Matthieu Napoli [ 06/Nov/12 ] |
|
Argh this issue should be closed, I apparently failed linking the pull request to |
| Comment by Benjamin Eberlei [ 06/Nov/12 ] |
|
A related Github Pull-Request [GH-508] was closed |
[DDC-2073] PersistentCollection::matching() always returns empty collection, when passed criteria's expression is created using ExpressionBuilder::isNull() Created: 12/Oct/12 Updated: 12/Nov/12 Resolved: 12/Nov/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | None |
| Affects Version/s: | 2.3 |
| Fix Version/s: | 2.3.1 |
| Security Level: | All |
| Type: | Bug | Priority: | Blocker |
| Reporter: | Pavol Kirschbaum | Assignee: | Benjamin Eberlei |
| Resolution: | Fixed | Votes: | 1 |
| Labels: | None | ||
| Description |
|
This happens because expression created by ExpressionBuilder::isNull() is wrongly translated to SQL using '=' operator instead of 'IS NULL'. If the collection is already loaded, result is as expected. |
| Comments |
| Comment by Matthieu Napoli [ 06/Nov/12 ] |
|
Pull request: https://github.com/doctrine/doctrine2/pull/508 |
[DDC-2071] [GH-476] Replaced the setting of Ids to the whereInQuery with a more performant implementation Created: 12/Oct/12 Updated: 12/Nov/12 Resolved: 12/Nov/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 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 HarmenM: Url: https://github.com/doctrine/doctrine2/pull/476 Message: While working with large datasets in combination with pagination (ie. a pagination window of 100 or more), the performance drastically decreased. I tracked the problem down to the setting of the parameters. In the old implementation, the parameters are set individually. This pull request sets the parameter as an array to the Query and Walker. Testing results (# of entities, original performance, improved performance): |
[DDC-2123] [GH-502] Fix for invalid 'double-ON' SQL generation with entity inheritance type JOINED. Created: 05/Nov/12 Updated: 09/Nov/12 Resolved: 06/Nov/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 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 gwis: Url: https://github.com/doctrine/doctrine2/pull/502 Message: In SqlWalker::walkJoin(), SqlWalker::walkRangeVariableDeclaration() can be This adds a test and a fix for the problem, by checking for an inheritance type It seems like this part of the code is begging to be refactored. This is my |
| Comments |
| Comment by Benjamin Eberlei [ 06/Nov/12 ] |
|
A related Github Pull-Request [GH-502] was closed |
| Comment by Fabio B. Silva [ 06/Nov/12 ] |
|
Merged : https://github.com/doctrine/doctrine2/commit/7a895209e3d9912bcc44fc8e8635dd48164a4749 |
[DDC-2116] [GH-498] Improve DocBlock annotations of generated entities Created: 02/Nov/12 Updated: 09/Nov/12 Resolved: 05/Nov/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 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 lanthaler: Url: https://github.com/doctrine/doctrine2/pull/498 Message: Currently, the DocBlock annotations for member variables contain the variable name as description which is redundant and should be removed. Furthermore the class is annotated with the FQN instead of just the name. This makes automatically generated documentation quite ugly. These changes will result in entities that as follows ```
instead of this: ```
|
| Comments |
| Comment by Markus Lanthaler [ 02/Nov/12 ] |
|
Just noticed that the message the doctrinebot posts on GitHub contains a typo: "thank you for **positing** this Pull Request". Don't know where to report this so I do it directly here |
| Comment by Benjamin Eberlei [ 03/Nov/12 ] |
|
A related Github Pull-Request [GH-498] was closed |
| Comment by Fabio B. Silva [ 05/Nov/12 ] |
|
Merged : https://github.com/doctrine/doctrine2/commit/515847bece281fe6a04f49b9a65fd10102c44f80 |
[DDC-2079] Error in build entities using yml with several inversedJoinColumns Created: 15/Oct/12 Updated: 09/Nov/12 Resolved: 21/Oct/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | Tools |
| Affects Version/s: | 2.3 |
| Fix Version/s: | 2.3.1 |
| Security Level: | All |
| Type: | Bug | Priority: | Critical |
| Reporter: | André Antônio Lemos de Moraes | Assignee: | Fabio B. Silva |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
windows 7/php 5.3/apache 2.2 |
||
| Description |
|
Hello guys, sorry for the bad English found the error during a necessity and would like to post the solution. Below is an example of my yml relationamento a many to many. manyToMany: Well this example is generating this code. /**
Notice that Doctrine 2 is not putting commas to separate JoinColumns. So looking at the source code I found the following code and put it solved my problem. The changes was performed in EntityGenerator.php line 1090. $arrJoins = array(); $lines[] = implode(",". PHP_EOL, $arrJoins); $arrJoinsInverse = array(); $lines[] = implode(",". PHP_EOL, $arrJoinsInverse); I hope you understand what I'm trying to say, for you do not know if this error occurred, but if there ocorrei is one possible solution. Thank you. |
| Comments |
| Comment by Fabio B. Silva [ 21/Oct/12 ] |
|
Fixed by : https://github.com/doctrine/doctrine2/commit/2c0feb2a46a7cf97dc2878e6214924c3ffdbce67 |
[DDC-2069] Spaces are not ignored in the "column" list of a uniqueConstraints Created: 12/Oct/12 Updated: 09/Nov/12 Resolved: 21/Oct/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | Mapping Drivers |
| Affects Version/s: | 2.3 |
| Fix Version/s: | 2.3.1 |
| Security Level: | All |
| Type: | Bug | Priority: | Minor |
| Reporter: | Matthieu Napoli | Assignee: | Fabio B. Silva |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | yaml | ||
| Description |
|
In a YAML configuration file Behavior correct for this:
uniqueConstraints:
myConstraint:
columns: column1,column2
However, if I add a space in the "columns" list:
uniqueConstraints:
myConstraint:
columns: column1, column2
I end up with the following exception: exception 'Doctrine\DBAL\Schema\SchemaException' with message 'There is no column with name ' column2' on table 'myTable'. This can be very confusing, especially if (by any chance) you have a line return just on the space in the command line: you never see the space in the exception message. It seems that YAML allows spaces in lists (http://en.wikipedia.org/wiki/YAML#Lists), but this line doesn't seem to be a YAML list. If it is parsed by Doctrine (split on ","), spaces should be ignored (or trimmed). |
| Comments |
| Comment by Matthieu Napoli [ 17/Oct/12 ] |
|
Note that using the correct YAML format works:
uniqueConstraints:
myConstraint:
columns: [column1, column2]
So it's confusing to have 2 possibilities to write the same thing, and that they don't behave the same. |
| Comment by Fabio B. Silva [ 21/Oct/12 ] |
|
Fixed by : https://github.com/doctrine/doctrine2/commit/814f2f9e039caf712b75af7f61d28c361189bcab |
[DDC-2086] [GH-484] Prevented "Undefined index" notice when updating Created: 17/Oct/12 Updated: 09/Nov/12 Resolved: 25/Oct/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | ORM |
| Affects Version/s: | 2.3, Git Master |
| Fix Version/s: | 2.3.1 |
| Security Level: | All |
| Type: | Bug | Priority: | Trivial |
| Reporter: | Benjamin Eberlei | Assignee: | Benjamin Eberlei |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | unitofwork | ||
| Environment: |
OS X 10.8.2, PHP 5.3.17, Nginx 1.2.4 (php through FPM) |
||
| Description |
|
This issue is created automatically through a Github pull request on behalf of jappie: Url: https://github.com/doctrine/doctrine2/pull/484 Message: While executing updates on an entity scheduled for update without a change-set, an "Undefined index" notice is raised. This issue will occur when you manually call $em()->getUnitOfWork()->scheduleForUpdate() on an entity that hasn't changed. The entity will be included in UnitOfWork::$entityUpdates, but because there are no changes, its oid will not be included in UnitOfWork::$entityChangeSets. I know I'm misusing scheduleForUpdate() a bit in this case, but the notice can easily be prevented with a !empty(). |
| Comments |
| Comment by Benjamin Eberlei [ 22/Oct/12 ] |
|
A related Github Pull-Request [GH-484] was closed |
| Comment by Fabio B. Silva [ 25/Oct/12 ] |
|
Merged : https://github.com/doctrine/doctrine2/commit/cd7ef6e7a70d4ff4c25a85fdae71676aa6548ea6 |
[DDC-2082] [GH-481] check for false as a return value from get_parent_class(), not null Created: 16/Oct/12 Updated: 09/Nov/12 Resolved: 24/Oct/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 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 beejeebus: Url: https://github.com/doctrine/doctrine2/pull/481 Message: MappingException::identifierRequired() and MappingException::classIsNotAValidEntityOrMappedSuperClass() both check for null, when they should check for false from get_parent_class(). |
| Comments |
| Comment by Benjamin Eberlei [ 22/Oct/12 ] |
|
A related Github Pull-Request [GH-481] was closed |
| Comment by Fabio B. Silva [ 24/Oct/12 ] |
|
Merged : https://github.com/doctrine/doctrine2/commit/9d0b254407e6f8827e0f00aa4ed0fcefc6111aad |
[DDC-2113] SQLFilter incorrect results when WHERE clause contains OR expression Created: 01/Nov/12 Updated: 09/Nov/12 Resolved: 05/Nov/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | ORM |
| Affects Version/s: | 2.2.2, 2.3, Git Master |
| Fix Version/s: | 2.3.1 |
| Security Level: | All |
| Type: | Bug | Priority: | Major |
| Reporter: | Vaughn Clayton | Assignee: | Benjamin Eberlei |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
When using an SQLFilter, if applied to a query that contains only OR expressions in the WHERE clause, the generated SQL is incorrect. Example:
Resulting SQL: Expected: The problem is that the order of operations is wrong. I'm getting users who aren't in account 2, making SQLFilter unreliable. |
| Comments |
| Comment by Fabio B. Silva [ 05/Nov/12 ] |
|
Fixed : https://github.com/doctrine/doctrine2/commit/129d6efd8585458fd4bde2a3eb9a5cac374f54fe |
[DDC-2115] [GH-496] Testing for key existance in basicEntityPersister / getIndividualValue Created: 02/Nov/12 Updated: 09/Nov/12 Resolved: 06/Nov/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 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 arse: Url: https://github.com/doctrine/doctrine2/pull/496 Message: wrapping the setting of value with an array_key_exists to prevent a notice from being thrown |
| Comments |
| Comment by Benjamin Eberlei [ 06/Nov/12 ] |
|
A related Github Pull-Request [GH-496] was closed |
| Comment by Fabio B. Silva [ 06/Nov/12 ] |
|
Merged : https://github.com/doctrine/doctrine2/commit/57e5fa98733f7a4f507845c6ade41bc16859add7 |
[DDC-2122] [GH-501] Allow 0 id for Entity Created: 05/Nov/12 Updated: 09/Nov/12 Resolved: 05/Nov/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 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 jeremymarc: Url: https://github.com/doctrine/doctrine2/pull/501 Message: When using a 0 id, it's throwing InvalidArgumentException (Binding entities to query parameters only allowed for entities that have an identifier.)�� |
| Comments |
| Comment by Benjamin Eberlei [ 05/Nov/12 ] |
|
A related Github Pull-Request [GH-501] was closed |
| Comment by Fabio B. Silva [ 05/Nov/12 ] |
|
Merged : https://github.com/doctrine/doctrine2/commit/ff80e99cc955c0842df9b376c7cd6506b2e41653 |
[DDC-1241] Additional parameters for EntityRepository::findAll() and EntityRepository::findOneBy() Created: 01/Jul/11 Updated: 09/Nov/12 Resolved: 06/Nov/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | ORM |
| Affects Version/s: | 2.1 |
| Fix Version/s: | 2.3.1 |
| Security Level: | All |
| Type: | Improvement | Priority: | Trivial |
| Reporter: | Jasper N. Brouwer | Assignee: | Benjamin Eberlei |
| Resolution: | Fixed | Votes: | 1 |
| Labels: | None | ||
| Description |
|
In the Doctrine 2.1 versions the method EntityRepository::findBy() accepts additional parameters for ordering, limit and offset. It would be nice for the method EntityRepository::findOneBy() to accept an additional parameter for ordering as well. It could use the following signature: And maybe update EntityRepository::findAll() as well with the signature: Looking forward to your thoughts. |
| Comments |
| Comment by Dieter Provoost [ 27/Jul/11 ] |
|
I can't seem to find the implementation of this even though this issue has been resolved. Is this possible? |
| Comment by Benjamin Eberlei [ 27/Jul/11 ] |
|
It was only added to "findBy" |
| Comment by Jasper N. Brouwer [ 27/Jul/11 ] |
|
So the resolution is actually a "won't fix" (in stead of "fixed")? I know this was added to "findBy", but my request was to extend the "findOneBy" and "findAll" as well... |
| Comment by Dieter Provoost [ 27/Jul/11 ] |
|
Can it also be added to "findOneBy"? It would come in very handy for the use case above (for example: finding the newest blog-post). |
| Comment by Benjamin Eberlei [ 27/Jul/11 ] |
|
Reopened for 2.2 with implementation for "findOneby()" |
| Comment by Guilherme Blanco [ 20/Dec/11 ] |
|
Updating fix version |
| Comment by Paweł Nowak [ 05/Nov/12 ] |
|
A proposed implementation of findOneBy with ordering is available with the following pull request: https://github.com/doctrine/doctrine2/pull/504. |
| Comment by Fabio B. Silva [ 06/Nov/12 ] |
|
Fixed : https://github.com/doctrine/doctrine2/commit/283ed55824b7c713611e4b1e336551be805c48b5 |
[DDC-2126] [GH-505] Fix errors in JoinClassPathExpression and SqlWalker Created: 05/Nov/12 Updated: 09/Nov/12 Resolved: 06/Nov/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 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 BenMorel: Url: https://github.com/doctrine/doctrine2/pull/505 Message:
|
| Comments |
| Comment by Benjamin Eberlei [ 06/Nov/12 ] |
|
A related Github Pull-Request [GH-505] was closed |
| Comment by Fabio B. Silva [ 06/Nov/12 ] |
|
Merged : https://github.com/doctrine/doctrine2/commit/6949a957826960e4cb8c4cf405a6c4528bbb2f84 |
[DDC-2121] EntityGenerator generates bad type hint (missing \) Created: 04/Nov/12 Updated: 09/Nov/12 Resolved: 06/Nov/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | Tools |
| Affects Version/s: | 2.1, 2.2, 2.3 |
| Fix Version/s: | 2.3.1 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Stéphane Erard | Assignee: | Fabio B. Silva |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
Having an Entity class with this property declaration : /** * @ORM\OneToMany(targetEntity="Plan", mappedBy="Dossier") * @var Plan[] **/ protected $Plans; Getter & Setter are generated this way : /** * Add Plans * * @param se\JpsBundle\Entity\Plan $plans * @return Dossier */ public function addPlan(\se\JpsBundle\Entity\Plan $plans) { $this->Plans[] = $plans; return $this; } Problem lies in the @param se\JpsBundle\Entity\Plan $plans Should be : \se\JpsBundle\Entity\Plan $plans Same thing for Doctrine Collection class. |
| Comments |
| Comment by Fabio B. Silva [ 06/Nov/12 ] |
|
Fixed : https://github.com/doctrine/doctrine2/commit/262c3eea6bd4313d34558ff434bf9b8ff34b7ab3 |
[DDC-2080] Entity's association changes after first call Created: 15/Oct/12 Updated: 15/Oct/12 Resolved: 15/Oct/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | ORM |
| Affects Version/s: | 2.3 |
| Fix Version/s: | 2.3, 2.3.1 |
| Security Level: | All |
| Type: | Bug | Priority: | Trivial |
| Reporter: | Koby Soto | Assignee: | Benjamin Eberlei |
| Resolution: | Invalid | Votes: | 0 |
| Labels: | None | ||
| Description |
|
i am using the latest version of doctrine: 2.3 when you call a generated association function, the first time everything is fine: $authors = $book->getBookToAuthors(); $authors = $book->getBookToAuthors(); $authors = $book->getBookToAuthors(); //will work public function getBookToAuthors() { return $this->bookToAuthors; }and the mapping is as follows: /**
|
| Comments |
| Comment by Koby Soto [ 15/Oct/12 ] |
|
sorry sorry sorry the target had One-To-One association instead of Many-To-One |
[DDC-2067] [GH-473] Fixes bug whereby orphan-removal value in XMLDriver is incorrectly parsed as true Created: 11/Oct/12 Updated: 12/Oct/12 Resolved: 12/Oct/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 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 mjphaynes: Url: https://github.com/doctrine/doctrine2/pull/473 Message: I realise this is very hand wavy and if you require some more information or test cases then I can see about that. However, just to get the issue logged, as I just spent 3 hours reverse engineering the doctrine code to find this, and it may help someone else. Basically when reading the XML mapping data from generated XML files the orphan-removal value was being incorrectly parse as 'true' when it was set to 'false' in the mapping file. I think this is because the XML parser was parsing the attribute as an object and when it was casted a boolean this meant the value became true. To overcome this I first cast the value as a string, and then to a bool. Let me know if you need more information. Thanks. |
[DDC-2068] [GH-474] Fixed bug with comment option not being added to column. Created: 11/Oct/12 Updated: 12/Oct/12 Resolved: 12/Oct/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 2.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 okovalov: Url: https://github.com/doctrine/doctrine2/pull/474 Message: Title explains everything... =) |
| Comments |
| Comment by Benjamin Eberlei [ 12/Oct/12 ] |
|
A related Github Pull-Request [GH-474] was closed |
[DDC-2072] [GH-477] fixed typo Created: 12/Oct/12 Updated: 12/Oct/12 Resolved: 12/Oct/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 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 jakoch: Url: https://github.com/doctrine/doctrine2/pull/477 Message: |
| Comments |
| Comment by Benjamin Eberlei [ 12/Oct/12 ] |
|
A related Github Pull-Request [GH-477] was closed |
[DDC-2028] [GH-444] Fixed some tyo error in XML Exporter Created: 13/Sep/12 Updated: 05/Oct/12 Resolved: 05/Oct/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 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 goetas: Url: https://github.com/doctrine/doctrine2/pull/444 Message: |
[DDC-2044] [GH-455] Fixed unique-constraint name in XML Exporter Created: 26/Sep/12 Updated: 05/Oct/12 Resolved: 05/Oct/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 radmar: Url: https://github.com/doctrine/doctrine2/pull/455 Message: |
| Comments |
| Comment by Benjamin Eberlei [ 05/Oct/12 ] |
|
A related Github Pull-Request [GH-455] was closed |
[DDC-2059] Property perceived as dumplicate in composite foreign key Created: 04/Oct/12 Updated: 05/Oct/12 Resolved: 05/Oct/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | Mapping Drivers |
| Affects Version/s: | 2.1.3 |
| Fix Version/s: | 2.2.4, 2.3.1 |
| Security Level: | All |
| Type: | Bug | Priority: | Major |
| Reporter: | Dimitris Bozelos | Assignee: | Benjamin Eberlei |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
I have the following schema: CREATE TABLE `user` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, PRIMARY KEY (`id`) ); CREATE TABLE `project` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `user_id` int(10) unsigned NOT NULL, PRIMARY KEY (`id`), ); CREATE TABLE `project_conversation` ( `project_id` int(10) unsigned NOT NULL, `user_id` int(10) unsigned NOT NULL, PRIMARY KEY (`project_id`,`user_id`) ) I have ommitted the foreign key definitions for better readability. When I execute doctrine:mapping:convert (in Symfony2, but it seems it's a Doctrine2 issue), I get the following error: [Doctrine\ORM\Mapping\MappingException] Property "user" in "Project" was already declared, but it must be declared only once I have tracked down the issue to be caused by the existence of `user_id` in the project table. So basically, because `project_conversation` references `project` which in turn references `user`, `project_conversation` reference to `user` is perceived as duplicate. I don't think that this should be the expected behavior though. user_id in `project` references the creator of the project while user_id in `project_conversation` references the creator of the conversation and thus I think the schema is valid. |
| Comments |
| Comment by Benjamin Eberlei [ 05/Oct/12 ] |
|
Will be fixed in 2.2.4 and 2.3.1 |
[DDC-2012] Inserting a new entity with a custom mapping type does not call convertToDatabaseValueSQL() when using InheritanceType("JOINED") Created: 04/Sep/12 Updated: 03/Oct/12 Resolved: 03/Oct/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | Mapping Drivers |
| Affects Version/s: | 2.2.3 |
| Fix Version/s: | 2.2.4, 2.3.1 |
| Security Level: | All |
| Type: | Bug | Priority: | Critical |
| Reporter: | Kaspars Sproģis | Assignee: | Fabio B. Silva |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
PHP |
||
| Attachments: |
|
| Description |
|
When using class type inheritance - @InheritanceType("JOINED") and inserting new entity with a custom mapping type, custom type method convertToDatabaseValueSQL() is never called. Here is sample class mapping: Unable to find source-code formatter for language: php. Available languages are: actionscript, html, java, javascript, none, sql, xhtml, xml /** * @Table(name="item") * @Entity * @InheritanceType("JOINED") * @DiscriminatorColumn(name="type_id", type="smallint") * @DiscriminatorMap({1 = "ItemPerson"}) */ class Item { /** * @Column(name="tsv", type="tsvector", nullable=true) */ protected $tsv; } /** * @Table(name="item_person") * @Entity */ class ItemPerson extends Item { } I am using the same custom TsvectorType with simple entities and even Mapped Superclasses and it works perfectly, however on InheritanceType("JOINED") method convertToDatabaseValueSQL() is never called :/ |
| Comments |
| Comment by Fabio B. Silva [ 24/Sep/12 ] |
|
Hi Kaspars, I can't reproduce, Thanks |
| Comment by Kaspars Sproģis [ 26/Sep/12 ] |
|
@Fabio thanks for looking into my problem It was quite strange, all i did was changed column that uses custom type to array and some minimal convertToDatabaseValue and convertToDatabaseValueSQL logic and convertToDatabaseValueSQL was never called. One more thing i noticed, this bug only appears on persist and not on merge. Thanks |
| Comment by Fabio B. Silva [ 29/Sep/12 ] |
|
Thanks Kaspars But sorry, I dont get your use case. Notice that convertToDatabaseValueSQL is called just when using queries to find a object by a especific columns which is your mapping type. |
| Comment by Kaspars Sproģis [ 29/Sep/12 ] |
|
I am using PostgreSQL tsvector data type for full text search. Here is my tsvector custom data type class: The only way to update this field in postgresql is to use postgresql function to_tsvector('some text'). public function convertToDatabaseValueSQL($sqlExpr, AbstractPlatform $platform) { return sprintf('to_tsvector(%s)', $sqlExpr); } But when i use inheritance, then by some reason convertToDatabaseValueSQL method is not called and tsv field is updated with simple text as returned by convertToDatabaseValue() method. Here is the result after persisting (for persist it failed) $person = new ItemPerson(); $person->setName('some words for test'); $em->persist($person); $em->flush(); DB Result: Name | Tsv --------------------|------------------------------------ some words for test | 'for' 'some' 'test' 'words' Here is the result after second time update (now by tsv format you can see it worked):
$person->setName('some more words for test');
$em->flush();
DB Result:
Name | Tsv
--------------------|------------------------------------
some words for test | 'test':5 'word':3
|
| Comment by Fabio B. Silva [ 30/Sep/12 ] |
|
Thanks Kaspars Now i saw the problem Writing a patch ... |
| Comment by Kaspars Sproģis [ 03/Oct/12 ] |
|
Just tested fixed version and everything works perfectly now. |
| Comment by Fabio B. Silva [ 03/Oct/12 ] |
|
Fixed by : https://github.com/doctrine/doctrine2/commit/91caff1d8965c20b72d5fdd04ffadf3ab063c1ba |
[DDC-2050] [GH-459] Fix DDC-2012 Created: 30/Sep/12 Updated: 03/Oct/12 Resolved: 03/Oct/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 2.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/459 Message: http://www.doctrine-project.org/jira/browse/DDC-2012 |
| Comments |
| Comment by Benjamin Eberlei [ 03/Oct/12 ] |
|
A related Github Pull-Request [GH-459] was closed |