Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-2056

[GH-462] [DDC-2055] Generate SELECT clause from ResultSetMappingBuilder

    Details

    • Type: New Feature New Feature
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.4
    • Component/s: None
    • Security Level: All
    • 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.

        Activity

        Hide
        Benjamin Eberlei added a comment -

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

        Show
        Benjamin Eberlei added a comment - A related Github Pull-Request [GH-462] was closed https://github.com/doctrine/doctrine2/pull/462
        Hide
        Doctrine Bot added a comment -

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

        Show
        Doctrine Bot added a comment - A related Github Pull-Request [GH-462] was closed: https://github.com/doctrine/dbal/pull/462

          People

          • Assignee:
            Benjamin Eberlei
            Reporter:
            Benjamin Eberlei
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: