[DDC-2056] [GH-462] [DDC-2055] Generate SELECT clause from ResultSetMappingBuilder Created: 03/Oct/12  Updated: 29/Dec/13  Resolved: 05/Oct/12

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

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


 Description   

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

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

Message:

Add support to generate entity result parts of the SELECT clause from a ResultSetMappingBuilder instance. Add support for column incrementing.

Sample:

public function testGenerateSelectClauseIncrement()

{ $rsm = new ResultSetMappingBuilder($this->_em); $rsm->addRootEntityFromClassMetadata('Doctrine\Tests\Models\CMS\CmsUser', 'u', ResultSetMappingBuilder::COLUMN_RENAMING_INCREMENT); $selectClause = $rsm->generateSelectClause(); $this->assertEquals('u.id AS id0, u.status AS status1, u.username AS username2, u.name AS name3, u.email_id AS email_id4', $selectClause); }

Restrictions:

This only generates the entity result clauses, not the ones for scalar results! Because we don't know what the scalar result actually means.



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

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

Comment by Doctrine Bot [ 29/Dec/13 ]

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

Generated at Mon Jul 28 10:37:06 UTC 2014 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.