[DC-371] Lazy loading - doctrine makes extra queries into db Created: 19/Dec/09  Updated: 23/Dec/10

Status: Open
Project: Doctrine 1
Component/s: Behaviors, Documentation, Query, Record
Affects Version/s: 1.2.0-BETA3
Fix Version/s: None

Type: Bug Priority: Critical
Reporter: Roman Drapeko Assignee: Jonathan H. Wage
Resolution: Unresolved Votes: 0
Labels: None
Environment:

Symfony 1.4, Doctrine Version: 1.2.0-BETA3



 Description   

Just downloaded symfony 1.4

First of all I have a query:

$q = \Doctrine_Query::create()
->select('u., ur.')
->from('UserDb u')
->leftJoin('u.RealUserDetailsDb ur')
->leftJoin('u.MockUserDetailsDb um')
->where('u.id = :user_id')
;
$user = $q->fetchOne(array(':user_id' => $uid));

After that I'm accessing the fields of this object:

$userArray = array(
'id' => $this->getUser()->getId(),
'real_user_details_id' => $this->getUser()->getRealUserDetailsId(),
'mock_user_details_id' => $this->getUser()->getMockUserDetailsId(),
'real_user_details' => array(),
'mock_user_details' => array()
);

This is the actual queries into DB:

NR1:
SELECT u.id AS u_id, u.user_real_id AS uuser_real_id, u.user_mock_id AS uuser_mock_id, u2.id AS u2id, u2.nickname AS u2nickname, u2.email AS u2_email FROM user u LEFT JOIN user_real u2 ON u.user_real_id = u2.id LEFT JOIN user_mock u3 ON u.user_mock_id = u3.id WHERE (u.id = :user_id)

NR2:
SELECT u.id AS u_id, u.user_real_id AS uuser_real_id, u.user_mock_id AS u_user_mock_id FROM user u WHERE (u.id = '1') LIMIT 1

As you can see there are TWO queries however there should be only one query. The problem is that u.user_real_id is NULL in database and when I do 'real_user_details_id' => $this->getUser()->getRealUserDetailsId() doctrine does not have enough intelligence to understand that these fields have been already requested in NR1. If I comment this field, everything works well.

SURPRISE!
And now a surprise... if I modify a little bit my first query: ">select('u.')" instead of , ">select('u., ur.*')" it WON'T make TWO queries. It will make ONLY ONE!

As you understand this a very critical bug and of course our system won't go to production with this bug.

P.S. Is it possible to turn off the lazy loading in doctrine?



 Comments   
Comment by Roman Drapeko [ 17/Jan/10 ]

Any comments? Will it be fixed??

Comment by Jonathan H. Wage [ 01/Mar/10 ]

Hi, I'd like to take a look but can you make a failing test case that I can run so that I can see if I can come up with a patch that fixes your case and doesn't break anything else.

Comment by Luke Winiarski [ 01/Jun/10 ]

Hi

I had similar problem but after several hours i did work it out

Try to make get method in your model for getting field which has NULL value in database

public function getUserRealId()

{ return $this->_get("user_real_id", false); }

by making second argument false u force doctrine not to lazy load value and extra sql query is not created

regards

Comment by Jonathan H. Wage [ 08/Jun/10 ]

Has anyone been able to reproduce this in a test case? I am not having much luck so far.

Comment by Gennady Feldman [ 23/Dec/10 ]

I've seen this a ton of times. Basically when it loads related records through the Hydrator using leftJoin() and gets NULLs back. BUT it doesn't save the fact that the related records are NULL. So when you actually do call to getRelated objects it sees that it doesn't have the value cached and runs the query again.

Let me know if I should show you the problem in the Doctrine code base.





Non-Equal Nest Relations Not Working - from "Children" side (DC-952)

[DC-958] updating Models with Intra-Table Relations cascades strangely Created: 24/Jan/11  Updated: 27/Jan/11

Status: Open
Project: Doctrine 1
Component/s: Behaviors, Documentation, Nested Set, Relations
Affects Version/s: 1.2.3
Fix Version/s: None

Type: Sub-task Priority: Major
Reporter: Daniel Reiche Assignee: Jonathan H. Wage
Resolution: Unresolved Votes: 0
Labels: None
Environment:

PHP 5.3 / symfony 1.4.9



 Description   

Sorry for the lengthy explanation, couldn't make it more straight forward:

I have a model which is similiar to a nestet set but the tree structure needs to overlap:

For Model A, every Object A1 can have multiple descendant objects A2 and in turn can be a descendant of multiple objects A0.

Since I saw no way to do this with Nested-Set Relations (or Equal-Nested-Sets) I have set up my Model like this:

modules:
columns: ..<do not matter>
relations:
Children:
class: modules
refClass: modules_required
Parents:
class: modules
refClass: modules_required

modules_required:
columns: <do not matter here, just 2 foreign key columns>
relations:
Children:
Parents:

I needed to specify the Relations on both tables, to use onDelete/onUpdate CASCADE rules. Generated Models look fine, just as intended.
(Every Class has many Children and has many Parents...)

Now the strange part:
When I update an object of modules (say id=18), Doctrine issues the following queries:
DELETE FROM modules_required WHERE (required_id = ? AND module_id IN (?, ?, ?, ?, ?)) - (18, 25, 26, 32, 34, 35)
// where 25 to 35 are CHILDREN of 18
UPDATE modules_required SET required_id = ? WHERE module_id = ? AND required_id = ? - (25, 25, 10)
UPDATE modules_required SET required_id = ? WHERE module_id = ? AND required_id = ? - (26, 26, 10)
UPDATE modules_required SET required_id = ? WHERE module_id = ? AND required_id = ? - (32, 32, 10)
UPDATE modules_required SET required_id = ? WHERE module_id = ? AND required_id = ? - (34, 34, 10)
UPDATE modules_required SET required_id = ? WHERE module_id = ? AND required_id = ? - (35, 35, 10)
UPDATE modules_required SET required_id = ? WHERE module_id = ? AND required_id = ? - (25, 25, 12)
//where 10 and 12 are PARENTS of 18
and somewhen, Doctrine encounters an MySQL ERROR because of the previous update marathon:
SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '25-25' for key 'PRIMARY'

The point is:
1. why is Doctrine trying to create self-referencing relations, and
2. why is it touching the relation at all, when i only did change some text fields in the object?

Is there a better way to solve my problem?



 Comments   
Comment by Daniel Reiche [ 25/Jan/11 ]

forgot to add something: I have done a debug run, to see why these queries are created, when there was no data modified that related to these tables:

Doctrine seems to handle my structure internally as a Nested-Set, although I have not specified an actAs: NestedSet or relations: equal: true statement in the model definition.
Is there a way to prevent symfony from misinterpreting this?

This is not a nested set, as each object can have virtually any other object either as parent or as a child, and additionaly, parent relations can span multiple tree-levels:
Object 2 is parent of Object 3 and 6
Object 3 is parent of Object 4 and 5
Object 4 is parent of Object 6

results in: Object 6 has parents 2 and 4 (where 4 has parent 3 and 3 has parent 2 in turn)

This spanning relations seems to cause the guessed nested set to fail.

I simply wanted to create an m:n Relation using a Reference table and the fact that both m and n are of the same class should not consider doctrine.

Comment by Daniel Reiche [ 26/Jan/11 ]

related to #DC-329:
seems to be the same general problem as described there. Only in DC 1.2.3, doctrine tries to delete every child-relation for some unknown reason.

also the h2aEqualable mentioned there does not work, because it does not prevent symfony from issueing the delete queries. It prevents only the UPDATE-Queries, and thus circumvents the MySQL-Error.

Nevertheless, data is still corrupted after object save, thus not useable in production.





[DC-862] INNER JOIN example is same as previous LEFT JOIN example Created: 08/Sep/10  Updated: 08/Sep/10

Status: Open
Project: Doctrine 1
Component/s: Documentation
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Roberto Mansfield Assignee: Jonathan H. Wage
Resolution: Unresolved Votes: 0
Labels: None
Environment:

http://www.doctrine-project.org/projects/orm/1.2/docs/manual/dql-doctrine-query-language/en#join-syntax



 Description   

I was reading the "JOIN syntax" section of the documentation. The docs first talk about how the default join type is LEFT JOIN and an example is presented. Next, INNER JOINS are discussed, but the example is the same left join example used previously. Am I misunderstanding the flow of the document?






[DC-736] [Documentation] Taking Advantage of Column Aggregation Inheritance Created: 14/Jun/10  Updated: 14/Jun/10

Status: Open
Project: Doctrine 1
Component/s: Documentation
Affects Version/s: 1.2.2
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Jason Brumwell Assignee: Jonathan H. Wage
Resolution: Unresolved Votes: 0
Labels: None


 Description   

The documentation at http://www.doctrine-project.org/projects/orm/1.2/docs/cookbook/taking-advantage-of-column-aggregation-inheritance/en#taking-advantage-of-column-aggregation-inheritance states when using foreign keys with column aggregation to set:

$this->options('export','tables');

this didn't work for me after looking into it I see it should be attributes so in the base class you can write:

$this->setAttribute(Doctrine_Core::ATTR_EXPORT, Doctrine_Core::EXPORT_TABLES);

or via schema:

attributes:
export: tables






[DC-631] Documentation Created: 15/Apr/10  Updated: 15/Apr/10

Status: Open
Project: Doctrine 1
Component/s: Documentation
Affects Version/s: 1.2.2
Fix Version/s: None

Type: Task Priority: Major
Reporter: Thomas Tourlourat - Armetiz Assignee: Jonathan H. Wage
Resolution: Unresolved Votes: 0
Labels: None


 Description   

http://www.doctrine-project.org/Doctrine_Record/1_2#method_importfrom

The description of the $type parameter is : Format type: xml, yml, json
But it could take an array.

So the documentation have to be update for this point.






[DC-501] Join and WITH keywords : documentation is confusing Created: 15/Feb/10  Updated: 15/Feb/10

Status: Open
Project: Doctrine 1
Component/s: Documentation
Affects Version/s: 1.1.6
Fix Version/s: None

Type: Improvement Priority: Major
Reporter: Julien B. Assignee: Jonathan H. Wage
Resolution: Unresolved Votes: 0
Labels: None


 Description   

Your documentation makes no sense to me on the usage of the WITH keyword

http://www.doctrine-project.org/documentation/manual/1_1/en/dql-doctrine-query-language:join-syntax#with-keyword

$q = Doctrine_Query::create()
  ->select('u.id, p.id')
  ->from('User u')
  ->leftJoin('u.Phonenumbers p WITH u.id = 2');

Get Users and the phone numbers if any of the user 2 (we could indeed need that kind of query)

-----------------------------------------------------------------------------------------------------------------------------------
I guess this kind of example query is better

// Documentation
Get users and their mobile phone numbers if any

$q = Doctrine_Query::create()
  ->select('u.id, p.id')
  ->from('User u')
  ->leftJoin('u.Phonenumbers p WITH p.type = ?', 'mobile');

you can expect this SQL

SELECT 
u.id AS u__id, 
p.id AS p__id 
FROM User u 
LEFT JOIN Phonenumbers p ON u.id = p.user_id AND p.type = 'mobile'

// Still in the documentation
Be aware that this query is different of

$q = Doctrine_Query::create()
  ->select('u.id, p.id')
  ->from('User u')
  ->leftJoin('u.Phonenumbers p')
  ->where('p.type = ?', 'mobile')
;

because you will strip away the users who do not have a mobile phone number

-----------------
Also the second example is more confusing ...

$q = Doctrine_Query::create()
    ->select('u.id')
    ->from('User u')
    ->leftJoin('u.Groups g')
    ->innerJoin('u.Phonenumbers p WITH u.id > 3')
    ->leftJoin('u.Email e');

Means : Get Users (who HAVE Phonenumbers (innerJoin)) with their potential (leftJoin) Groups, potential (leftJoin) Emails, and their Phonenumbers
but not for the Users 1, 2 and 3

Not really the straight forward example we can expect in a documentation

Best regards






[DC-379] No description of ATTR_DEFAULT_IDENTIFIER_OPTIONS now in "Chapter 4 Configuration" Created: 23/Dec/09  Updated: 23/Dec/09

Status: Open
Project: Doctrine 1
Component/s: Documentation
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: zerkms Assignee: Jonathan H. Wage
Resolution: Unresolved Votes: 0
Labels: None


 Description   

In the previous (1.1) documentation version there were small but useful description about how to set up primary key (http://www.doctrine-project.org/documentation/manual/1_1/en/configuration#defaults-attributes:default-added-auto-id)
Now there is nothing about ATTR_DEFAULT_IDENTIFIER_OPTIONS and it takes about 20 minutes to debug and find out where did "id" field added

ps: message "If you find a problem with the documentation or have a suggestion, please register and open a ticket. " in the bottom of the docs pages is ambiguous due to it points to trac :-$






[DC-348] Doctrine manual does not document that columns can be added with simple inheritance, or the semantics of accessing those columns in the parent Created: 10/Dec/09  Updated: 10/Dec/09

Status: Open
Project: Doctrine 1
Component/s: Documentation
Affects Version/s: 1.2.1
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Tom Boutell Assignee: Jonathan H. Wage
Resolution: Unresolved Votes: 0
Labels: None


 Description   

The Doctrine manual's section on inheritance mentions simple inheritance only briefly. The examples do not show that columns can be added, nor do they explain that the parent model class can also access those columns (very useful when you override its methods at the application level in Symfony).

Both behaviors are supported (Jon suggested I take advantage of them at one point) but it's easy to miss the fact that they are available. For a long time I assumed column aggregation inheritance was the only way to add columns.

I'm now exploiting simple inheritance as a way to add columns to sfGuardUser rather than introducing an sfGuardUserProfile class with all of the attendant problems of trying to pretend two tables are actually one table. This is very useful.

(Out of curiosity, is there an alternative way to add columns to plugin schemas at the app level in Symfony 1.3 similar to the way it's now done for Propel?)






[DC-339] Documentation unclear about linking inherited objects Created: 08/Dec/09  Updated: 08/Dec/09

Status: Open
Project: Doctrine 1
Component/s: Documentation
Affects Version/s: 1.2.1
Fix Version/s: None

Type: Improvement Priority: Major
Reporter: Tarjei Huse Assignee: Jonathan H. Wage
Resolution: Unresolved Votes: 0
Labels: None


 Description   

The (very nice) doctrine documentation fails to mention anything about how inherited objects handle relations.

I.e. if I got the model:
Entity:
columns:
username: string(20)
password: string(16)
created_at: timestamp
updated_at: timestamp

User:
inheritance:
extends: Entity
type: column_aggregation
keyField: type
keyValue: 1

Group:
inheritance:
extends: Entity
type: column_aggregation
keyField: type
keyValue: 2

Topic:
content: string
entity_id: integer
relations:
User:
class: Entity
local: entity_id
foreign: id

Can I then define both users and groups to link to Topic?






[DC-1012] Doctrine_core specified twice in documentation Defining Models -> Join Table Associations Created: 28/Jun/11  Updated: 28/Jun/11

Status: Open
Project: Doctrine 1
Component/s: Documentation
Affects Version/s: 1.2.3
Fix Version/s: None

Type: Documentation Priority: Minor
Reporter: Justinas Assignee: Jonathan H. Wage
Resolution: Unresolved Votes: 0
Labels: None


 Description   

$manager->setAttribute(Doctrine_Core::Doctrine_Core::ATTR_QUOTE_IDENTIFIER, true);

should be:

$manager->setAttribute(Doctrine_Core::ATTR_QUOTE_IDENTIFIER, true);

http://www.doctrine-project.org/projects/orm/1.2/docs/manual/defining-models/en#relationships:join-table-associations






[DC-1001] Doctrine Caching page does not mention the "prefix" option Created: 29/Apr/11  Updated: 17/Apr/14

Status: Open
Project: Doctrine 1
Component/s: Caching, Documentation
Affects Version/s: None
Fix Version/s: None

Type: Documentation Priority: Minor
Reporter: Arend van Waart Assignee: Roman S. Borschel
Resolution: Unresolved Votes: 1
Labels: None


 Description   

http://www.doctrine-project.org/documentation/manual/1_1/en/caching

When not using a prefix with multiple / yet similay projects a mixup of query caching will occur (for example with sfDoctrineGuard queries). This is very easialy fixed with a prefix - but I only realized after two months - that this feature actually existed. There is no mention of this in the documention.

A mention of the feature

$q = Doctrine_Query::create()
->useResultCache(new Doctrine_Cache_Apc(array('prefix'=>'myproject_')));

Would have helped me and I think it will also help others.



 Comments   
Comment by Pablo Grass [ 27/Jun/11 ]

I concur with Arend - mentioning of 'prefix' in the documentation could make this valuable feature much less of a pain to find...
Still holds true in 1.2. documentation: http://www.doctrine-project.org/projects/orm/1.2/docs/manual/caching/en





[DC-995] Doctrine deprecated in favor of Doctrine_Core - phpdoc Created: 06/Apr/11  Updated: 06/Apr/11

Status: Open
Project: Doctrine 1
Component/s: Documentation
Affects Version/s: 1.2.3
Fix Version/s: None

Type: Documentation Priority: Minor
Reporter: Pablo Grass Assignee: Jonathan H. Wage
Resolution: Unresolved Votes: 0
Labels: None
Environment:

all environments



 Description   

http://www.doctrine-project.org/projects/orm/1.2/docs/whats-new/en clearly states that the Doctrine class is deprecated - e.g. in order to allow for proper autoloading.
To enable IDEs to perform proper autocomplete and to encourage programmers not to use the Doctrine class anymore, it's phpdoc block shuld by changed in order to contain a

@deprecated In favor of Doctrine_Core - this class extends Doctrine_Core for BC






[DC-923] Documentation 1.2 #working-with-models error Created: 10/Nov/10  Updated: 10/Nov/10

Status: Open
Project: Doctrine 1
Component/s: Documentation
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Minor
Reporter: Martin Babic Assignee: Jonathan H. Wage
Resolution: Unresolved Votes: 0
Labels: None
Environment:

Ubuntu 10.4, LAMP



 Description   

In documentation

http://www.doctrine-project.org/projects/orm/1.2/docs/manual/working-with-models/en#many-to-many-relations:creating-a-new-link

There's an error in example code:

// test.php

// ...
$user = new User();
$user->username = 'Some User';
$user->Groups[0]->username = 'Some Group';
$user->Groups[1]->username = 'Some Other Group';
$user->save();

The error is on lines:

$user->Groups[0]->username = 
$user->Groups[1]->username = 

they shoud be:

$user->Groups[0]->name = 
$user->Groups[1]->name = 

as there's no username column in schema.yml definition of Group object.






[DC-872] 1.2 Documentation on Aggregate Functions Error Created: 21/Sep/10  Updated: 21/Sep/10

Status: Open
Project: Doctrine 1
Component/s: Documentation
Affects Version/s: 1.2.3
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Isaac Foster Assignee: Jonathan H. Wage
Resolution: Unresolved Votes: 0
Labels: None


 Description   

In the documentation for using aggregate values with Doctrine Query (link below), there is a code snippet that shows how to access the value of the aggregate field, which does not work.

The code snippet is:

//firstsnippet after header
$q = Doctrine_Query::create()
->select('u.id, COUNT(t.id) AS num_threads')
->from('User u, u.Threads t')
->where('u.id = ?', 1)
->groupBy('u.id');

//second snippet after header
$users = $q->execute();

//fourth snippet after header
echo $users->num_threads . ' threads found';

The code from the last snippet for accessing the count value, $users->num_threads, doesn't seem to work. What does work for me is:

//access count value
echo $users[0]->num_threads

//My exact code is:
$query = Doctrine_Query::create()
->select('COUNT as batchCount')
->from('Batch');
$result = $query->execute();

echo $result->batchCount; //10
echo $result[0]->batchCount; //3 (3 is correct, from direct MySQL command line query)

It's certainly possible I'm doing something wrong, or that there is a Doctrine_Core attribute I need to set. If there is a Doctrine_Core attribute to set to automatically access aggregate values from the Collection, it would be worth noting at the top of the section.

Thanks, and thanks for Doctrine (so awesome).

Link:
http://www.doctrine-project.org/projects/orm/1.2/docs/manual/dql-doctrine-query-language/hu#select-queries:aggregate-values






[DC-868] [Documentation] Column aggregation Created: 16/Sep/10  Updated: 16/Sep/10

Status: Open
Project: Doctrine 1
Component/s: Documentation
Affects Version/s: 1.2.3
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Michael Simpson Assignee: Jonathan H. Wage
Resolution: Unresolved Votes: 0
Labels: None


 Description   

The example in the documentation at http://www.doctrine-project.org/documentation/manual/1_2/en/inheritance:column-aggregation suggests that the discriminator (in this case 'type') column does not need to be defined in the parent class 'Entity'.

This did not work for me, I had to declare the discriminator column as shown in the 'Taking advantage of column aggregation inheritance' chapter at http://www.doctrine-project.org/projects/orm/1.2/docs/cookbook/taking-advantage-of-column-aggregation-inheritance/en.






[DC-846] Provide documentation for connection options Created: 29/Aug/10  Updated: 29/Aug/10

Status: Open
Project: Doctrine 1
Component/s: Documentation
Affects Version/s: 1.2.3
Fix Version/s: None

Type: Improvement Priority: Minor
Reporter: Ritty Assignee: Jonathan H. Wage
Resolution: Unresolved Votes: 0
Labels: None
Environment:

All



 Description   

Provide additional information on connection options.

$conn = Doctrine_Manager::connection('mysql://username:password@localhost/test', 'connection 1');

just skims the surface. At least link to PDO docs. Also, what is the second parameter? I can look in API docs, but it would be helpful to have in the reference guide.

Are there any other ways to make a connection, such as through an array of parameters?






[DC-738] Missing reference to make code usable Created: 15/Jun/10  Updated: 17/Jun/10

Status: Open
Project: Doctrine 1
Component/s: Documentation
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Minor
Reporter: Dennis Gearon Assignee: Jonathan H. Wage
Resolution: Unresolved Votes: 0
Labels: None
Environment:

Doctrine web site



 Description   

Web page documentation is missing some details on following page: // ...
http://www.doctrine-project.org/documentation/manual/1_0/pl/connections:get-connection-name
http://www.doctrine-project.org/documentation/manual/1_2/pl/connections:get-connection-name

I think they were just taken out of context from a page like:
http://www.doctrine-project.org/projects/orm/1.2/docs/manual/connections/en#get-connection-name
where a previous reference to manager .... oops, that page has no previous reference to '$manager' either!!!

Where does the $manager variable come into this? FWIW, I tried that code to get the connection name in a Symfony/Doctrine CLI Task, and it says, 'using object accessor on non object'. I'll keep working on what it's supposed to look like, but the last page above, and every page of documentation derived from it should be checked for the relevance and accuracy of the $manager variable.






[DC-1039] Return value of function Doctrine_Tree_NestedSet::fetchRoot($id) Created: 31/Oct/11  Updated: 31/Oct/11

Status: Open
Project: Doctrine 1
Component/s: Documentation
Affects Version/s: None
Fix Version/s: None

Type: Documentation Priority: Trivial
Reporter: Dmitry Artanov Assignee: Jonathan H. Wage
Resolution: Unresolved Votes: 0
Labels: None


 Description   

In api documentation about Doctrine_Tree_NestedSet::fetchRoot($id) said - it return void. But this is not true. This function return mixed - bool or model data.






[DC-906] Missing retrieval method Created: 30/Oct/10  Updated: 31/Oct/10

Status: Open
Project: Doctrine 1
Component/s: Documentation
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Trivial
Reporter: Christopher W. Allen-Poole Assignee: Jonathan H. Wage
Resolution: Unresolved Votes: 0
Labels: None
Environment:

online



 Description   

This page:
http://www.doctrine-project.org/projects/orm/1.2/docs/manual/getting-started/en#getting-started

only lists svn as a way to check out the doctrine source. It's also available via git.






[DC-909] Add Some Info to Doctrine Query order by Method Documentation Created: 01/Nov/10  Updated: 01/Nov/10

Status: Open
Project: Doctrine 1
Component/s: Documentation
Affects Version/s: 1.2.3
Fix Version/s: None

Type: Improvement Priority: Trivial
Reporter: Isaac Foster Assignee: Jonathan H. Wage
Resolution: Unresolved Votes: 0
Labels: None
Environment:

n/a



 Description   

This is very minor, but would have saved me a few minutes. On the Doctrine Query documentation page (V1 - http://www.doctrine-project.org/projects/orm/1.2/docs/manual/dql-doctrine-query-language/en#order-by-clause), it would be useful to note that multiple calls to Doctrine_Query::orderBy() do not stack, and that the later calls will over write the previous ones. I'll propose:

To sort by multiple columns, you must specify them in one call to Doctrine_Query::orderBy(). If you call orderBy a second time, the column from the first call will not be included in the resulting query.

<code>
//works as expected
//results in ORDER BY id ASC, userName DESC
$query->orderBy('id ASC, userName DESC');

//does not work as expected
//results in ORDER BY userName DESC
$query->orderBy('id ASC')
->orderBy('userName DESC');
</code>






[DC-786] phpdoc comment error Created: 14/Jul/10  Updated: 14/Jul/10

Status: Open
Project: Doctrine 1
Component/s: Documentation
Affects Version/s: 1.2.2
Fix Version/s: None

Type: Bug Priority: Trivial
Reporter: mike Assignee: Jonathan H. Wage
Resolution: Unresolved Votes: 0
Labels: None
Environment:

n/a



 Description   

in Doctrine/Core.php on line 881

comment for method generateModelsFromYaml() is:
881: * Generate a yaml schema file from an existing directory of models

should be:
881: * Generates models from a yaml schema file






Generated at Thu Jul 31 11:52:23 UTC 2014 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.