[DDC-1201] DQL Example about count(*) related entity is wrong Created: 10/Jun/11 Updated: 10/Oct/11 |
|
| Status: | Open |
| Project: | Doctrine 2 - ORM |
| Component/s: | Documentation |
| Affects Version/s: | 2.1.1 |
| Fix Version/s: | None |
| Security Level: | All |
| Type: | Documentation | Priority: | Major |
| Reporter: | Benjamin Eberlei | Assignee: | Benjamin Eberlei |
| Resolution: | Unresolved | Votes: | 1 |
| Labels: | None | ||
| Description |
|
DQL Example about count |
| Comments |
| Comment by Aigars Gedroics [ 10/Oct/11 ] |
|
Also similar DQL in documentation URL http://www.doctrine-project.org/docs/orm/2.1/en/reference/dql-doctrine-query-language.html#pure-and-mixed-results fails parsing stage: $dql = "SELECT u, 'some scalar string', count(u.groups) AS num FROM User u JOIN u.groups g GROUP BY u.id";
with error [Doctrine\ORM\Query\QueryException] [Semantical Error] line 0, col 40 near 'localizations)': Error: Invalid PathExpression. StateFieldPathExpression or SingleValuedAssociationField expected. Should be "count(g.id)" instead of "count(u.groups)". |
[DDC-1025] Please repalce 'Doctrine\XXX\YYY' with '\Doctrine\XXX\YYY' in code and document Created: 09/Feb/11 Updated: 13/Dec/11 |
|
| Status: | Open |
| Project: | Doctrine 2 - ORM |
| Component/s: | Documentation, DQL, Mapping Drivers, ORM, Tools |
| Affects Version/s: | 2.0.1 |
| Fix Version/s: | None |
| Security Level: | All |
| Type: | Improvement | Priority: | Major |
| Reporter: | ben yan | Assignee: | Benjamin Eberlei |
| Resolution: | Unresolved | Votes: | 7 |
| Labels: | None | ||
| Description |
|
It will help us use the namespace and code autocomplete in some IDE. |
| Comments |
| Comment by Matthieu Napoli [ 08/Apr/11 ] |
|
Hi, do you have any more information about this ? I'm confused because the php documentation uses the Doctrine\XXX way, and everywhere I've seen, it is used like that. Thanks |
| Comment by Karsten Dambekalns [ 11/Apr/11 ] |
|
The issue is simple and logical. When an IDE (I am using PhpStorm and it does it like this) sees a namespace in a file, upon seeing namespaces afterwards, it sees them as absolute if they have a leading backslash, or relative when it does not. This affects the resolution of classes for type navigation, code inspection, ... The same rules as for actual PHP code should be used within comments. Here is an example: namespace Foo;
class Bar {
/**
* @var Baz
*/
protected $baz;
/**
* @var \Quux
*/
protected $quux;
}
The IDE will think $baz is \Foo\Baz and $quux will be seen as being \Quux. Now if you have some reference to Doctrine here, and it was relative, the IDE would assume it's \Foo\Doctrine\... |
| Comment by Benjamin Eberlei [ 11/Apr/11 ] |
|
Well yes, but since all our code examples have no leading namespace argument this means the code is in the default namespace, making Doctrine\XXX\YY a relative namespace that is actually valid. |
| Comment by Karsten Dambekalns [ 11/Apr/11 ] |
|
Yes, but the source code docblocks are what is meant here as far as I am concerned. |
| Comment by Andrey Kolyshkin [ 13/May/11 ] |
|
Example (Entitymanager.php): namespace Doctrine\ORM; and /** * The used Configuration. * * @var Doctrine\ORM\Configuration */ private $config; Result: Should be: /** * The used Configuration. * * @var Configuration */ private $config; Or /** * The used Configuration. * * @var \Doctrine\ORM\Configuration */ private $config; |
| Comment by Miha Vrhovnik [ 27/May/11 ] |
|
Why don't you take this to the PhpStorm tracker as it surely is a bug in IDE? |
| Comment by Karsten Dambekalns [ 27/May/11 ] |
|
Miha, what makes you think it's an IDE bug? In a class in namespace Foo another class named Bar is \Foo\Bar, but \Bar is \Bar. Why is it a bug if the IDE follows the namespace resolution rules? |
| Comment by Michael Ridgway [ 11/Jul/11 ] |
|
The issue is that PHPStorm and NetBeans have different class resolution rules. I also use PHPStorm and most of Doctrine does not resolve auto-completion correctly because of this issue. I'd be willing to work on this if it would be accepted. |
| Comment by Andrew Mackrodt [ 29/Sep/11 ] |
|
I've been evaluating PhpStorm and also came across this issue; I believe the problem is due to Doctrine rather than being a bug with the IDE although it would be nice if PhpStorm would assume namespaces are absolute if they're not resolved upon an initial lookup. I created a quick c# app to append the beginning forward slash to any @var or @return attributes within Doctrine's source. It's working for me with Doctrine 2.1.2 and PhpStorm (IntelliJ): http://pastebin.com/4HxiWvJA - hopefully this will be of use for anyone else using these IDEs;. Note: the application doesn't detect multiple line annotations although the only one I'm aware of is the getAST method in Doctrine\ORM\Query.php. |
| Comment by Benjamin Eberlei [ 13/Dec/11 ] |
|
This issue is referenced in Github Pull-Request GH-215 |
| Comment by Benjamin Eberlei [ 13/Dec/11 ] |
|
This issue is referenced in Github Pull-Request GH-216 |
[DDC-1011] Finding out if a model is persist Created: 02/Feb/11 Updated: 02/Feb/11 |
|
| Status: | Open |
| Project: | Doctrine 2 - ORM |
| Component/s: | Documentation |
| Affects Version/s: | 2.0 |
| Fix Version/s: | None |
| Security Level: | All |
| Type: | Documentation | Priority: | Major |
| Reporter: | Ronny Deter | Assignee: | Benjamin Eberlei |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
To find out if a model is persist, is missing in the documentation of doctrine 2. To become the state of an model you must call the entitymanager->getUnitOfWork()->getEntityState(model) |
[DDC-993] Cookbook: Overriding the ID Generator during a database migration Created: 19/Jan/11 Updated: 28/Oct/12 |
|
| Status: | Open |
| Project: | Doctrine 2 - ORM |
| Component/s: | Documentation |
| Affects Version/s: | 2.0 |
| Fix Version/s: | None |
| Security Level: | All |
| Type: | Documentation | Priority: | Major |
| Reporter: | Timo A. Hummel | Assignee: | Benjamin Eberlei |
| Resolution: | Unresolved | Votes: | 1 |
| Labels: | None | ||
| Description |
|
If you need to override the ID Generator, e.g. during a migration, you can do that in your migration script as follows: Overriding the ID generator $em->getClassMetadata('foo\bar\Entity')->setIdGenerator(new \Doctrine\ORM\Id\AssignedGenerator()); Make sure that both calls equal to the same generator type. You can now modify the @Id fields in your entities. Additionally, make sure that you set the IdGenerator after you created the database using e.g. SchemaTool->create(). |
| Comments |
| Comment by Endre Kósa [ 27/Oct/12 ] |
|
Hi, this doesn't seem to work for me. I have written a small database export / import utility. As long as I use the automatic ID generation, everything works flawlessly, but I'm trying to preserve the existing IDs. I do exactly what you've suggested in your post. It works for @OneToOne relations, but I get the following error messages when persisting entities that are parts of @ManyToOne relations: |
| Comment by Endre Kósa [ 28/Oct/12 ] |
|
Never mind. I've upgraded to Doctrine 2.3.0 and it works as expected. |
[DDC-948] incorrect link from the types page to known vendor issues Created: 25/Dec/10 Updated: 25/Dec/10 |
|
| Status: | Open |
| Project: | Doctrine 2 - ORM |
| Component/s: | Documentation |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Security Level: | All |
| Type: | Documentation | Priority: | Major |
| Reporter: | Lukas Kahwe | Assignee: | Benjamin Eberlei |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
http://www.doctrine-project.org/docs/dbal/2.0/en/reference/types.html links to http://www.doctrine-project.org/docs/dbal/2.0/en/known-vendor-issues instead of http://www.doctrine-project.org/docs/dbal/2.0/en/reference/known-vendor-issues.html Also noticed that the documentation still says "Doctrine DBAL v2.0.0-BETA4 documentation" |
| Comments |
| Comment by Lukas Kahwe [ 25/Dec/10 ] |
|
err sorry .. this is of course a DBAL doc issue not and ORM issue. |
[DDC-923] Add note about DateTime Query Parameter Type Hint Created: 10/Dec/10 Updated: 10/Dec/10 |
|
| Status: | Open |
| Project: | Doctrine 2 - ORM |
| Component/s: | Documentation |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Security Level: | All |
| Type: | Documentation | Priority: | Major |
| Reporter: | Benjamin Eberlei | Assignee: | Benjamin Eberlei |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
[DDC-919] subselect Created: 08/Dec/10 Updated: 20/Mar/11 |
|
| Status: | Open |
| Project: | Doctrine 2 - ORM |
| Component/s: | Documentation |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Security Level: | All |
| Type: | Documentation | Priority: | Major |
| Reporter: | Mungiu Dragos | Assignee: | Roman S. Borschel |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
i'd like to see more example in documentation with this subselects |
| Comments |
| Comment by Alberto [ 20/Mar/11 ] |
|
Subselect as columns or FROM clause should have mor examples. |
[DDC-1475] Documentation for One-To-Many, Bidirectional Association does not have YAML example Created: 07/Nov/11 Updated: 07/Nov/11 |
|
| Status: | Open |
| Project: | Doctrine 2 - ORM |
| Component/s: | Documentation |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Security Level: | All |
| Type: | Documentation | Priority: | Major |
| Reporter: | Christian Stoller | Assignee: | Benjamin Eberlei |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
When you are looking for a config example for the bidirectional mapping of an one-to-many association you will just find an example with XML, but not with YAML or PHP. It would be nice if somebody could add an example or a link to the bidirectional one-to-one association, because it should be the same, right? Here the link to the example: http://www.doctrine-project.org/docs/orm/2.0/en/reference/association-mapping.html#one-to-many-bidirectional |
[DDC-1645] Paths to Annotations classes are not considered Created: 10/Feb/12 Updated: 10/Feb/12 |
|
| Status: | Open |
| Project: | Doctrine 2 - ORM |
| Component/s: | Documentation, Mapping Drivers |
| Affects Version/s: | 2.2 |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major |
| Reporter: | feathers and down | Assignee: | Benjamin Eberlei |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Environment: |
openSUSE 12.1 x86, Apache/2.2.21, mysql 5.5.16, PHP 5.3.8 (modules: Core, ctype, curl, date, dom, ereg, filter, gd, hash, http, iconv, json, libxml, mbstring, mcrypt, mhash, mysql, mysqli, mysqlnd, pcre, PDO, pdo_mysql, pdo_sqlite, Reflection, session, SimpleXML, SPL, SQLite, sqlite3, standard, tokenizer, xml, xmlreader, xmlwriter, zip, zlib ) |
||
| Attachments: |
|
| Description |
|
Hi, my battle is described here: http://groups.google.com/group/doctrine-user/browse_thread/thread/db9c77b6bc000f13 When I follow bugtracker tutorial I think that there is an error when working with Annotations, see these examples: Start a new bugtracker project as described in tutorial from scratch, create folders and files as tutorial expose, then do following changes: 1) put Product, Bug, User class files at root level, same level as bootstraps files and create_xxxxx files 1) YAML so Setup method path argument is considered correctly, Doctrine engine must know where yaml files for classes are. 2) XML so Setup method path argument is considered correctly again, Doctrine engine must know where xml files for classes are. 3) Annotations so Setup method path argument IS NOT CONSIDERED, Doctrine engine use already defined classes to get Annotations docblocks using php reflexion classes, methods and functions. How to deal with this? I mean... a) Erase path argument from Setup::createAnnotationMetadataConfiguration methos (and similar functions for Annotations) because is not needed, classes and annotations must be defined before. I know that is easy to follow tutorial guidelines to develop applications in Annotations point of view, load them before Doctrine script start (with require/include or autoloaders, etc) and will work, but I think that is wrong how tutorial and functional logic are given, so a) and b) are my proposed solutions. I think b) should be right, get dockblocks from a class already defined and if are not defined it follow XML and YAML logic: read metadata from other files. Attachment: My bugtracker Netbeans project. Sorry by my english |
[DDC-1513] Missing documentation for using references in Docs Created: 28/Nov/11 Updated: 29/Nov/11 |
|
| Status: | Open |
| Project: | Doctrine 2 - ORM |
| Component/s: | Documentation |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Security Level: | All |
| Type: | Documentation | Priority: | Major |
| Reporter: | Thomas Gray | Assignee: | Benjamin Eberlei |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
I am in the process of switching over from Doctrine 2.0.7 to Doctrine 2.1 and one of the major missing components in my entities was the new use of using the mapping entity. Example:
<?php
namespace My\Project\Entities;
use Doctrine\ORM\Mapping\Entity as ORM;
/**
* @ORM\Entity(...)
*/
class Something
{
// Doctrine annotations here
}
The nessecity for this to be included in the entities is (as far as I can tell) nowhere to be found in the docs, so I am a little curious as to how people are supposed to know. I have also had a look here: http://www.doctrine-project.org/blog/doctrine-2-1-beta-release and can see no references too it. Am I missing something; or is it really just missing from the docs? |
| Comments |
| Comment by Erik Bernhardson [ 28/Nov/11 ] |
|
I also glanced through the docs and didn't find it. I would suggest it be added to the Annotations Reference page: http://www.doctrine-project.org/docs/orm/2.1/en/reference/annotations-reference.html |
| Comment by Thomas Gray [ 29/Nov/11 ] |
|
Ahh, so there are some docs about it; http://www.doctrine-project.org/docs/common/2.1/en/reference/annotations.html however they do not seem to be that clear; nor well linked too. |
[DDC-1947] Update EBNF with arbitrary joins Created: 26/Jul/12 Updated: 26/Jul/12 |
|
| Status: | Open |
| Project: | Doctrine 2 - ORM |
| Component/s: | Documentation |
| Affects Version/s: | 2.3, Git Master |
| Fix Version/s: | None |
| Security Level: | All |
| Type: | Documentation | Priority: | Major |
| Reporter: | Marco Pivetta | Assignee: | Marco Pivetta |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
Arbitrary joins need to be documented in EBNF |
[DDC-1894] Cannot view Doctrine 2.2 QueryBuilder documentation Created: 27/Jun/12 Updated: 27/Jun/12 |
|
| Status: | Open |
| Project: | Doctrine 2 - ORM |
| Component/s: | Documentation |
| Affects Version/s: | 2.2 |
| Fix Version/s: | None |
| Type: | Documentation | Priority: | Major |
| Reporter: | Douglas Teoh | Assignee: | Benjamin Eberlei |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Chrome, Firefox, Safari on OS X |
||
| Description |
|
Visiting the following page: http://www.doctrine-project.org/api/orm/2.2/class-Doctrine.ORM.QueryBuilder.html always redirects back to http://www.doctrine-project.org/api/orm/2.2/ |
[DDC-2185] Better explain DQL "WITH" and implications for the collection filtering API Created: 04/Dec/12 Updated: 17/Dec/12 |
|
| Status: | Open |
| Project: | Doctrine 2 - ORM |
| Component/s: | Documentation, DQL |
| Affects Version/s: | 2.2 |
| Fix Version/s: | None |
| Security Level: | All |
| Type: | Documentation | Priority: | Major |
| Reporter: | Matthias Pigulla | Assignee: | Benjamin Eberlei |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | collection, documentation, dql, filtering | ||
| Description |
|
Available documentation is a bit thin regarding the "WITH" clause on JOIN expressions. Only a single example is provided in WITH seems to allow to only "partially" load a collection, so the collection in memory does not fully represent the associations available in the database. The resulting collection is marked as "initialized" and it seems there is no way to tell later on whether/how (with which expression) the collection has been initialized. When using the collection filtering API, the "initialized" flag on the collection will lead to in-memory processing. If a collection has been loaded WITH a restricting clause and another filter is applied later, results may not be what one might expect. I assume this is by design (no idea how the collection could be "partially" loaded and behave correctly under all conditions), so filing it as a documentation issue. |
| Comments |
| Comment by Matthias Pigulla [ 17/Dec/12 ] |
|
An additional observation: If you eager-load a collection using WITH, for the resulting entities that collection is marked as initialized as described above. Should you happen to come across the same entity during hydration in another (later) context where you explicitly eager load the same association without the WITH restriction (or with another one), the collection on that (existing) entity won't be re-initialized and still contains the associated objects found during the first query. |
[DDC-1099] Tutorial :: Getting started code sample entity manager Created: 04/Apr/11 Updated: 11/Jul/11 |
|
| Status: | Open |
| Project: | Doctrine 2 - ORM |
| Component/s: | Documentation |
| Affects Version/s: | Git Master |
| Fix Version/s: | None |
| Security Level: | All |
| Type: | Documentation | Priority: | Major |
| Reporter: | Gordon Franke | Assignee: | Benjamin Eberlei |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
see pull request 24 on github.com |
| Comments |
| Comment by Michael Ridgway [ 11/Jul/11 ] |
|
This issue should be closed: https://github.com/doctrine/orm-documentation/pull/24 |
[DDC-1088] Description for SequenceGenerator annotation options is wrong Created: 30/Mar/11 Updated: 30/Mar/11 |
|
| Status: | Open |
| Project: | Doctrine 2 - ORM |
| Component/s: | Documentation |
| Affects Version/s: | 2.x |
| Fix Version/s: | None |
| Security Level: | All |
| Type: | Documentation | Priority: | Major |
| Reporter: | Alexandre Mathieu | Assignee: | Benjamin Eberlei |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Environment: |
N/A |
||
| Description |
|
On paragraph 4.8.1.1 SequenceGenerator, the correct example should be: <?php
|
[DDC-1089] Annotations reference examples are inaccurate and confusing Created: 30/Mar/11 Updated: 30/Mar/11 |
|
| Status: | Open |
| Project: | Doctrine 2 - ORM |
| Component/s: | Documentation |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Security Level: | All |
| Type: | Documentation | Priority: | Major |
| Reporter: | Maarten van Leeuwen | Assignee: | Benjamin Eberlei |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Environment: |
N.A. |
||
| Description |
|
In chapter 19 of the reference guide some coding examples seem to be inaccurate or incorrect. Especially when it comes to the bidirectional many-to-many associations, this might be confusing. Example:
Some other code fragments in chapter 19 have similar issues. I think they could easily be replaced by the examples from the earlier chapters, like for the bidirectional man-to-many association the example from chapter 5: |
[DDC-1072] Private property mapping can cause issues, suggest changing to protected Created: 17/Mar/11 Updated: 17/Mar/11 |
|
| Status: | Open |
| Project: | Doctrine 2 - ORM |
| Component/s: | Documentation |
| Affects Version/s: | 2.0.2 |
| Fix Version/s: | None |
| Security Level: | All |
| Type: | Documentation | Priority: | Major |
| Reporter: | Kevin Bradwick | Assignee: | Benjamin Eberlei |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Environment: |
not applicable |
||
| Description |
|
The documentation recommends using private variables in entities. This can be problematic on entities with relations when using caching drivers as the proxy objects cannot access private variables and so the caching driver can throw notices like ...apc_store(): "_id" returned as member variable from __sleep() but Making member variables protected resolves this issue when caching is enabled. This information would be helpful on the documentation so others can be made aware of this issue. We spent a few days trying to debug the issue before understanding exactly what was going on. |
[DDC-1702] EBNF for IN expressions should be updated for 2.2 Created: 13/Mar/12 Updated: 13/Mar/12 |
|
| Status: | Open |
| Project: | Doctrine 2 - ORM |
| Component/s: | Documentation |
| Affects Version/s: | 2.2 |
| Fix Version/s: | None |
| Security Level: | All |
| Type: | Documentation | Priority: | Major |
| Reporter: | Patrick Schwisow | Assignee: | Benjamin Eberlei |
| Resolution: | Unresolved | Votes: | 1 |
| Labels: | None | ||
| Description |
|
Following the changes made for |
| Comments |
| Comment by Patrick Schwisow [ 13/Mar/12 ] |
|
I marked this as "Major" because this change represents a BC break. Because EBNF was not updated, I initially believed this to be a bug in ORM and wasted a lot of time debugging Doctrine code before I discovered this change was intentional. |
[DDC-682] ORACLE CHARSET DOCUMENTATION Created: 10/Jul/10 Updated: 10/Jul/10 |
|
| Status: | Open |
| Project: | Doctrine 2 - ORM |
| Component/s: | Documentation |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Security Level: | All |
| Type: | Improvement | Priority: | Major |
| Reporter: | fernando guerrero | Assignee: | Roman S. Borschel |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Environment: |
ORACLE db SYMFONY |
||
| Description |
|
Openning an Oracle Database with Doctrine and Symfony doesn't support by default utf8 charset. To support it, it is necessary to specify charset=AL32UTF8 in the dsn of the database in config/databases.yml. Analogous to the example shown at oracle:dbname=//192.168.2.9:1521/nomina_dev;charset=AL32UTF8 Documentation by Alexia Velásquez (alexia.velasquez@hotmail.es, Vladimir Tàmara (vtamara@pasosdeJesus.org) and Fernando Guerrero |
[DDC-1605] No documentation about the usage of indexes with YAML and XML Created: 16/Jan/12 Updated: 08/Apr/13 |
|
| Status: | In Progress |
| Project: | Doctrine 2 - ORM |
| Component/s: | Documentation |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Security Level: | All |
| Type: | Documentation | Priority: | Major |
| Reporter: | Christian Stoller | Assignee: | Benjamin Eberlei |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | documentation | ||
| Description |
|
I am missing documentation about how to handle indexes in YAML and XML definition files. I had to search in the code to learn how to do that. This issue is related to # EDIT:
User:
type: entity
fields:
id:
id: true
type: integer
generator:
strategy: IDENTITY
email:
type: string
length: 150
unique: true
active:
type: boolean
indexes:
indexActiveField: { name: idx_user_active, columns: [ active ] }
indexActiveField is the name of the index used by doctrine and idx_user_active is the name of the index in the database. The rest should be clear. |
| Comments |
| Comment by Christian Stoller [ 27/Sep/12 ] |
|
Hi. I got an email notification that arbuscula has changed the status to "Awaiting Feedback". Do you need any feedback from me? |
[DDC-2401] INDEX BY not working on multiple columns Created: 16/Apr/13 Updated: 18/Apr/13 |
|
| Status: | Open |
| Project: | Doctrine 2 - ORM |
| Component/s: | Documentation, ORM |
| Affects Version/s: | 2.3.3 |
| Fix Version/s: | None |
| Security Level: | All |
| Type: | Bug | Priority: | Major |
| Reporter: | Quintenvk | Assignee: | Benjamin Eberlei |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Attachments: |
|
| Description |
|
According to the docs on this page: The following "multi-dimensional index" should be perfectly possible, with a default hydration mode: However, b.id is completely ignored (it is a numeric primary key). I tried to go further, giving 2 products a matching barcode and indexing by barcode and then a (unique, numeric) productid. Only the barcode worked as a key and only one of the products with a matching barcode was selected. I used this query to test: I also flagged the docs, because I don't think a userid should/could be starting from 0. |
| Comments |
| Comment by Fabio B. Silva [ 18/Apr/13 ] |
|
Hi Quintenvk Could you please try to write a failing test case ? Thanks |
| Comment by Quintenvk [ 18/Apr/13 ] |
|
I added a testcase. Please note that the database settings are to be configured in Core/simplys/simplys.php, and that the dump is in dummy.sql. Apart from that all should run well immediately. |
| Comment by Quintenvk [ 18/Apr/13 ] |
|
Fabio, Please check the zip I just attached. I hope this helps you in finding the problem. Thanks, |
| Comment by Fabio B. Silva [ 18/Apr/13 ] |
|
Thanks Quintenvk, SELECT p.barcode, p.id, p.name FROM \core\Simplys\Entity\Products p INDEX BY p.barcode JOIN p.businessid b INDEX BY p.id In this DQL you are trying to index by scalar values, Also the INDEX BY documentations seems wrong to me. The given DQL : SELECT u.id, u.status, upper(u.name) nameUpper FROM User u INDEX BY u.idJOIN u.phonenumbers p INDEX BY p.phonenumber Show the following result : array
0 =>
array
1 =>
object(stdClass)[299]
public '__CLASS__' => string 'Doctrine\Tests\Models\CMS\CmsUser' (length=33)
public 'id' => int 1
..
'nameUpper' => string 'ROMANB' (length=6)
1 =>
array
2 =>
object(stdClass)[298]
public '__CLASS__' => string 'Doctrine\Tests\Models\CMS\CmsUser' (length=33)
public 'id' => int 2
...
'nameUpper' => string 'JWAGE' (length=5)
Which IMHO represents another DQL, something like : SELECT u, p , upper(u.name) nameUpper FROM User u INDEX BY u.id JOIN u.phonenumbers p INDEX BY p.phonenumber |
| Comment by Quintenvk [ 18/Apr/13 ] |
|
Thanks for your reply Fabio. Thanks, |
| Comment by Fabio B. Silva [ 18/Apr/13 ] |
|
Not sure if it's exactly the result you need but you can try Something like : SELECT p, b FROM \core\Simplys\Entity\Products p INDEX BY p.barcode JOIN p.businessid b INDEX BY p.id or something like : SELECT PARTIAL p.{id, barcode, name}, b.{id, attributesYouNeed} FROM \core\Simplys\Entity\Products p INDEX BY p.barcode JOIN p.businessid b INDEX BY p.id
And than : $result = $query->getArrayResult(); |
| Comment by Quintenvk [ 18/Apr/13 ] |
|
Both produce the same result as the query I had. I think i'll move on to loops after a bit more research, too bad it can't be done (at least for now) though... Would've been nice. Thanks for your help though! |
[DDC-2254] Exporting and restoring a query. Created: 23/Jan/13 Updated: 04/May/13 |
|
| Status: | Open |
| Project: | Doctrine 2 - ORM |
| Component/s: | Documentation, DQL, ORM |
| Affects Version/s: | Git Master, 2.3.2 |
| Fix Version/s: | None |
| Security Level: | All |
| Type: | Improvement | Priority: | Major |
| Reporter: | Dries De Peuter | Assignee: | Benjamin Eberlei |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | dql, rebuild, restore, save | ||
| Environment: |
OSX |
||
| Description |
|
When you have a queryBuilder and you want to break it down using getDQLParts, You can't restore it by looping over the parts and adding them. This is what I am doing:
$parts = $qb->getDQLParts();
// save the parts and use them in a different environment.
$newQb = $em->createQueryBuilder();
foreach ($parts as $name => $part) {
$newQb->add($name, $part);
}
|
| Comments |
| Comment by Dries De Peuter [ 23/Jan/13 ] |
|
I wrote a test showing the issue. https://github.com/NoUseFreak/doctrine2/commit/8574b79fd3d245532bbe7e310c5cbe083892057a |
| Comment by Benjamin Eberlei [ 04/May/13 ] |
|
This is not a bug, because restoring queries is not yet a feature of the QueryBuilder. Marking as possible improvement for future. |
[DDC-1248] Documentation regarding prePersist and postPersist events a bit lacking Created: 04/Jul/11 Updated: 04/Jul/11 |
|
| Status: | Open |
| Project: | Doctrine 2 - ORM |
| Component/s: | Documentation |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Security Level: | All |
| Type: | Documentation | Priority: | Minor |
| Reporter: | Helmer Aaviksoo | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Browser |
||
| Description |
|
Please make it more clear that prePersist and postPersist events are called only when creating new entity (that is, prior and after a database insert). IRC log: Pastie code (probably expired by now): $entity->setSomething('xxx'); $entity->setSomething('yyy'); |
[DDC-1015] @DiscriminatorColumn is not required anymore Created: 03/Feb/11 Updated: 03/Feb/11 |
|
| Status: | Open |
| Project: | Doctrine 2 - ORM |
| Component/s: | Documentation |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Security Level: | All |
| Type: | Documentation | Priority: | Minor |
| Reporter: | Karsten Dambekalns | Assignee: | Benjamin Eberlei |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
Since |
[DDC-987] How to register lifecycle callbacks from YAML is not done correctly in the Events section of the documentation. Created: 14/Jan/11 Updated: 14/Jan/11 |
|
| Status: | Open |
| Project: | Doctrine 2 - ORM |
| Component/s: | Documentation |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Security Level: | All |
| Type: | Documentation | Priority: | Minor |
| Reporter: | Amir | Assignee: | Benjamin Eberlei |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
http://www.doctrine-project.org/docs/orm/2.0/en/reference/events.html The above URL has an example of how to register lifecycle callbacks from YAML, but actually it does not work. The correct way of doing it is mentioned on the page: http://www.doctrine-project.org/docs/orm/2.0/en/reference/yaml-mapping.html |
[DDC-986] bad cli commands in ORM introduction Created: 14/Jan/11 Updated: 15/Jan/11 |
|
| Status: | Open |
| Project: | Doctrine 2 - ORM |
| Component/s: | Documentation |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Security Level: | All |
| Type: | Documentation | Priority: | Minor |
| Reporter: | Stepan Tanasiychuk | Assignee: | Benjamin Eberlei |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
I read mini tutorial http://www.doctrine-project.org/docs/orm/2.0/en/reference/introduction.html#mini-tutorial and try run command "doctrine orm:schema-tool --drop"
It's not worked for me:
But command "doctrine orm:schema-tool:drop --force" and "doctrine orm:schema-tool:create" is worked. |
[DDC-1405] Define semantics of comparison operators, particularly with regard to null values Created: 06/Oct/11 Updated: 12/Oct/11 |
|
| Status: | Open |
| Project: | Doctrine 2 - ORM |
| Component/s: | Documentation |
| Affects Version/s: | 2.1.2 |
| Fix Version/s: | None |
| Security Level: | All |
| Type: | Improvement | Priority: | Minor |
| Reporter: | Daniel Alvarez Arribas | Assignee: | Benjamin Eberlei |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
The Doctrine 2 reference documentation defines the comparison operators syntactically, as: ComparisonOperator ::= "=" | "<" | "<=" | "<>" | ">" | ">=" | "!=" Now, without experimentation, it is pure guesswork to tell whether e. g. null = null, or e. g. null <> null, or null = 0, or null <> 0 are considered true statements in DQL. In SQL semantics, all four statements would be false (or more precisely, null). In PHP semantics, both null == null and null == 0 would be true, while null != null and null != 0 would be false. It would be helpful to have the semantics of the comparison operators defined. While comparisons with non-null values behave in a common-sense way, it is hard to guess how queries involving comparison operators on fields allowing null values or null query arguments will filter the results, without knowing the exact semantics of the comparison operators with regard to null values. It would be great if this could be clarified in the docs. Thanks. |
[DDC-1329] Documentation for @JoinColumn may be incorrect Created: 13/Aug/11 Updated: 13/Aug/11 |
|
| Status: | Open |
| Project: | Doctrine 2 - ORM |
| Component/s: | Documentation, ORM |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Security Level: | All |
| Type: | Documentation | Priority: | Minor |
| Reporter: | Damon Jones | Assignee: | Benjamin Eberlei |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
The Documentation for @JoinColumn annotation states: However, this seems not to be correct. If you have non-standard name for the @Id columns for a @OneToMany/@ManyToMany the name and referencedColumnName are not correctly inferred. https://gist.github.com/e61bf8f4462870ffd4f3 |
[DDC-1983] Incorrect use statement in 25.1.3. Configuration example (Doctrine Console) Created: 15/Aug/12 Updated: 15/Aug/12 |
|
| Status: | Open |
| Project: | Doctrine 2 - ORM |
| Component/s: | Documentation |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Documentation | Priority: | Minor |
| Reporter: | Atli Thor Jonsson | Assignee: | Benjamin Eberlei |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | Cli, documentation | ||
| Description |
|
The code example here: In the second "use" statement it references a "EntityManagerHelper" from the "Doctrine\DBAL\Tools\Console\Helper\" package. However, it does not exist there. It does exist in the "Doctrine\ORM\Tools\Console\Helper\" package though, and replacing it seems to work. |
[DDC-1555] Reference. 8 Work. with obj. Making "see "Transitive Persistence"" as link Created: 22/Dec/11 Updated: 22/Dec/11 |
|
| Status: | Open |
| Project: | Doctrine 2 - ORM |
| Component/s: | Documentation |
| Affects Version/s: | 2.1, 2.1.1, 2.1.2, 2.1.3, 2.1.4, 2.1.5 |
| Fix Version/s: | None |
| Security Level: | All |
| Type: | Documentation | Priority: | Minor |
| Reporter: | Yaroslav Kiliba | Assignee: | Benjamin Eberlei |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
8. Working with Objects: |
[DDC-1511] Suggestion on the docs for batch processing Created: 25/Nov/11 Updated: 25/Nov/11 |
|
| Status: | Open |
| Project: | Doctrine 2 - ORM |
| Component/s: | Documentation |
| Affects Version/s: | 2.0 |
| Fix Version/s: | None |
| Type: | Documentation | Priority: | Minor |
| Reporter: | Jamie Wong | Assignee: | Benjamin Eberlei |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Environment: |
br0wser |
||
| Description |
|
I am refering to the examples on http://www.doctrine-project.org/docs/orm/2.0/en/reference/batch-processing.html Let's say you want to process a bulk of 25 objects and have a batchsize of 20. This is probably very clear to any experienced Doctrine developer but maybe it is also confusing for beginners like me (some internet sources say, that flush is executed automatically at the end of the request, but obviously it is not). Maybe this could be mentioned somewhere? |
[DDC-1921] Clarify Identifier definition for CTI entities Created: 11/Jul/12 Updated: 11/Jul/12 |
|
| Status: | Open |
| Project: | Doctrine 2 - ORM |
| Component/s: | Documentation |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Security Level: | All |
| Type: | Documentation | Priority: | Minor |
| Reporter: | Ludek Stepan | Assignee: | Benjamin Eberlei |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
Hello, Reference Guide topic 4.8 Identifers/Primary Keys(http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/basic-mapping.html#identifiers-primary-keys) states that: "Every entity class needs an identifier/primary key." However, example in topic 7.3. Class Table Inheritance (http://docs.doctrine-project.org/projects/doctrine-orm/en/2.1/reference/inheritance-mapping.html#class-table-inheritance) doesn't contain any definitions for Ids. Consider following code: /** * @Entity * @InheritanceType("JOINED") * @DiscriminatorColumn(name="discr", type="string") * @DiscriminatorMap({"person" = "Person", "employee" = "Employee"}) */ class Person { /** @Id @Column(type="integer") */ private $id; public function getId() { return $this->id; } } /** @Entity */ class Employee extends Person { /** @Id @Column(type="integer") */ private $id; // Overrides parent to retrieve private public function getId() { return $this->id; } } // create instances and $em->persist(...) // $person instanceof Person $person->getId(); // Returns id. // $employee instanceof Employee $employee->getId(); // Returns null. Private $id in subclass isn't assigned. Please clarify correct use of identifiers in CTI subclass entities. Should subclasses contain any definitions of identifiers? Thank you! Ludek |
[DDC-2286] Update documentation for collation Created: 08/Feb/13 Updated: 08/Feb/13 |
|
| Status: | Open |
| Project: | Doctrine 2 - ORM |
| Component/s: | Documentation |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Documentation | Priority: | Minor |
| Reporter: | Rickard Andersson | Assignee: | Benjamin Eberlei |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | collation, documentation | ||
| Description |
|
The documentation at http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/faq.html#how-do-i-set-the-charset-and-collation-for-mysql-tables clearly states that the collation should be set at database level and then inherited for all tables created. Digging through the code and reading this issue http://www.doctrine-project.org/jira/browse/DDC-2139 it's clear that this is no longer the case. |
[DDC-2227] Add details about developer being responsible of inverse side of an association Created: 09/Jan/13 Updated: 09/Jan/13 |
|
| Status: | Open |
| Project: | Doctrine 2 - ORM |
| Component/s: | Documentation, ORM |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Documentation | Priority: | Minor |
| Reporter: | Marco Pivetta | Assignee: | Marco Pivetta |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
As far as I know, docs don't explain that it is up to the developer to keep the object graph consistent instead of relying on Doctrine ORM for everything. For example, for many to many, examples like following may be used: |
[DDC-1058] Documentation on orphan removal in XML Mapping is incorrect Created: 04/Mar/11 Updated: 04/Mar/11 |
|
| Status: | Open |
| Project: | Doctrine 2 - ORM |
| Component/s: | Documentation |
| Affects Version/s: | 2.0 |
| Fix Version/s: | None |
| Security Level: | All |
| Type: | Documentation | Priority: | Minor |
| Reporter: | Josh Freed | Assignee: | Benjamin Eberlei |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
The XML Mapping documentation indicates that "orphan-removal" is an attribute on One-to-One or Many-to-One elements, but in DoctrineORM version 2.0 that does not work. It seems I have to make "orphan-removal" a child attribute of those elements to turn it on. Just to be clear: Documentation says to do this, but it does not work: This does work: |
[DDC-473] Inadequate description for @MappedSuperclass in Annotations Reference Created: 25/Mar/10 Updated: 26/Aug/10 |
|
| Status: | Open |
| Project: | Doctrine 2 - ORM |
| Component/s: | Documentation |
| Affects Version/s: | 2.0-ALPHA4 |
| Fix Version/s: | 2.0 |
| Security Level: | All |
| Type: | Improvement | Priority: | Minor |
| Reporter: | David Abdemoulaie | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
This doesn't adequately communicate how to use it. It took me several minutes of failing before I downloaded the PDF and did a search for @MappedSuperclass to find an example of how it's used. Specifically the following were unclear:
|
| Comments |
| Comment by David Abdemoulaie [ 25/Mar/10 ] |
|
Apparently it's also incompatible with several other tag as well. I thought it made sense to try the following and see if the @InheritanceType and @Discriminator___ tags would apply to the children classes: /**
* @MappedSuperclass
* @InheritanceType("SINGLE_TABLE")
* @DiscriminatorColumn(name="type", type="string")
* @DiscriminatorMap({"User" = "User", "Group" = "Group"})
*/
abstract class Principal
But apparently this flags D2 to treat it as an Entity anyway, resulting in the following error: PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'sentact5.principal' |
| Comment by Benjamin Eberlei [ 28/Mar/10 ] |
|
I updated the documentation, the question is if we should check for the mapped superclass attribute and throw exceptions if other entity level annotations are specified. |
| Comment by Roman S. Borschel [ 15/Apr/10 ] |
|
A mapped superclass has not many restrictions and these are mentioned in the docs (i.e. only unidirectional associations), what David mentions above should work, if it doesnt its a bug, I think |
| Comment by Roman S. Borschel [ 15/Apr/10 ] |
|
David, @"Is this defined on the superclass or on the children classes?" It doesnt matter. A @MappedSuperclass can be anywhere in an inheritance hierarchy and it always does the same thing, inherit its mapping information to subclasses (but its not itself an entity). The docs say: Mapped superclasses, just as regular, non-mapped classes, can appear in the middle of an otherwise mapped inheritance hierarchy (through Single Table Inheritance or Class Table Inheritance).
as well as Entities support inheritance, polymorphic associations, and polymorphic queries. Both abstract and concrete classes can be entities. Entities may extend non-entity classes as well as entity classes, and non-entity classes may extend entity classes.
So entities, mapped superclasses and plain non-mapped classes can appear mixed in an inheritance hierarchy. Nevertheless all the classes in a hierarchy that are entities must use 1 inheritance strategy, you can not mix inheritance mapping strategies in a single class hierarchy. @"If it's defined on the child classes, does it take parameters? The name of the super class?" No, it doesnt. The docs dont mention any parameters either which is correct. @"It was not at all apparent to me that it was mutually exclusive with the @Entity tag" OK, that needs to be made clearer in the docs then. |
[DDC-740] Mantain a list of DQL reserved keywords Created: 09/Aug/10 Updated: 09/Aug/10 |
|
| Status: | Open |
| Project: | Doctrine 2 - ORM |
| Component/s: | Documentation |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Security Level: | All |
| Type: | Improvement | Priority: | Minor |
| Reporter: | Guilherme Blanco | Assignee: | Guilherme Blanco |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
We should keep a list of DQ reserved keywords, so users can check out what they can use or not. |
[DDC-823] Errors in 2.0 Cookbook Documentation Created: 01/Oct/10 Updated: 11/Jul/11 |
|
| Status: | Open |
| Project: | Doctrine 2 - ORM |
| Component/s: | Documentation |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Security Level: | All |
| Type: | Task | Priority: | Trivial |
| Reporter: | Ralfas Jegorovas | Assignee: | Roman S. Borschel |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
Paragraph 1: Paragraph 2: What would be the best way to note other errors? |
| Comments |
| Comment by Benjamin Eberlei [ 04/Oct/10 ] |
|
The best way for us would be if you fork the docs on github, change the stuff and commit it. Then issue a pull request. It sounds complicated, but should be minimal overhead of ~5 minutesn on your end, but then we can merge it with a mouse-click, so we dont need to duplicate the whole correction effort on our end. |
| Comment by Joel Clermont [ 27/Jan/11 ] |
|
I have fixed the typos from this ticket that were still present in the docs and issued a pull request on Github. |
| Comment by Michael Ridgway [ 11/Jul/11 ] |
|
This issue should be closed: https://github.com/doctrine/orm-documentation/pull/17 |
[DDC-1003] Documentation refers to EAGER loading as FETCH Created: 26/Jan/11 Updated: 26/Jan/11 |
|
| Status: | Open |
| Project: | Doctrine 2 - ORM |
| Component/s: | Documentation |
| Affects Version/s: | 2.0 |
| Fix Version/s: | None |
| Security Level: | All |
| Type: | Documentation | Priority: | Trivial |
| Reporter: | jared fraser | Assignee: | Benjamin Eberlei |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
Throughout the documentation found in the following link (http://www.doctrine-project.org/docs/orm/2.0/en/reference/xml-mapping.html) when mentioning eager or lazy loading the documentation says FETCH instead of EAGER. E.G. content says "fetch - Either LAZY or FETCH" which should read "fetch - Either LAZY or EAGER" This occurs in a few different areas on this page. |
[DDC-940] Entities can / can not have private properties Created: 15/Dec/10 Updated: 15/Dec/10 |
|
| Status: | Open |
| Project: | Doctrine 2 - ORM |
| Component/s: | Documentation |
| Affects Version/s: | 2.0-RC2 |
| Fix Version/s: | None |
| Security Level: | All |
| Type: | Documentation | Priority: | Trivial |
| Reporter: | Ray Rehbein | Assignee: | Roman S. Borschel |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Environment: |
PHP 5.3.3 (cli) (built: Nov 14 2010 16:54:26) |
||
| Description |
|
In the note in If this is the only reason entities can't have private properties, then this restriction is no longer valid, or possibly be reconsidered. <?php
class A {
private $a = null;
public function setValue($value) {
$this->a = $value;
}
}
class B extends A {}
$b = new B();
$b->setValue("B");
var_dump($b);
$c = unserialize(serialize($b));
var_dump($c);
The output suggests private variables are serialized, and are restored fine |
[DDC-1611] Tools Reference example is apparently wrong Created: 19/Jan/12 Updated: 20/Jan/12 |
|
| Status: | Open |
| Project: | Doctrine 2 - ORM |
| Component/s: | Documentation |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Documentation | Priority: | Trivial |
| Reporter: | Tarcísio Fischer | Assignee: | Benjamin Eberlei |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
I was reading http://www.doctrine-project.org/docs/orm/2.1/en/reference/tools.html The example seems to be wrong. use Doctrine\DBAL\Tools\Console\Helper\EntityManagerHelper; That's all. |
| Comments |
| Comment by craz [ 20/Jan/12 ] |
|
Yes, this is a real problem. fixation and helped me |