ResultSetMappingBuilder generate column's aliases different from DefaultQuoteStrategy #6588

Open
opened 2026-01-22 15:35:25 +01:00 by admin · 0 comments
Owner

Originally created by @askobara on GitHub (Dec 12, 2020).

For example:
id0 instead of id_0

As a result code like this:

    public function findDelailView($id)
    {
        $qb = $this->createQueryBuilder('s');
        $rsm = $this->createResultSetMappingBuilder('s');

        $query = $qb
            ->andWhere($qb->expr()->eq('s.id', ':id'))
            ->setParameter('id', $id)
            ->getQuery()
            ->setResultSetMapping($rsm)
        ;

        return $query->getSingleResult();
    }

will returns nothing

tested on 2.8.1

Originally created by @askobara on GitHub (Dec 12, 2020). For example: `id0` instead of `id_0` As a result code like this: ```php public function findDelailView($id) { $qb = $this->createQueryBuilder('s'); $rsm = $this->createResultSetMappingBuilder('s'); $query = $qb ->andWhere($qb->expr()->eq('s.id', ':id')) ->setParameter('id', $id) ->getQuery() ->setResultSetMapping($rsm) ; return $query->getSingleResult(); } ``` will returns nothing tested on 2.8.1
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#6588