DDC-2056: [GH-462] [DDC-2055] Generate SELECT clause from ResultSetMappingBuilder #2594

Closed
opened 2026-01-22 13:57:51 +01:00 by admin · 3 comments
Owner

Originally created by @doctrinebot on GitHub (Oct 3, 2012).

Originally assigned to: @beberlei on GitHub.

Jira issue originally created by user @beberlei:

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.

Originally created by @doctrinebot on GitHub (Oct 3, 2012). Originally assigned to: @beberlei on GitHub. Jira issue originally created by user @beberlei: 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.
admin added the New Feature label 2026-01-22 13:57:51 +01:00
admin closed this issue 2026-01-22 13:57:51 +01:00
Author
Owner

@doctrinebot commented on GitHub (Oct 5, 2012):

Comment created by @beberlei:

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

@doctrinebot commented on GitHub (Oct 5, 2012): Comment created by @beberlei: A related Github Pull-Request [GH-462] was closed https://github.com/doctrine/doctrine2/pull/462
Author
Owner

@doctrinebot commented on GitHub (Oct 5, 2012):

Issue was closed with resolution "Fixed"

@doctrinebot commented on GitHub (Oct 5, 2012): Issue was closed with resolution "Fixed"
Author
Owner

@doctrinebot commented on GitHub (Dec 29, 2013):

Comment created by @doctrinebot:

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

@doctrinebot commented on GitHub (Dec 29, 2013): Comment created by @doctrinebot: A related Github Pull-Request [GH-462] was closed: https://github.com/doctrine/dbal/pull/462
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#2594