2

I'm using doctrine DBAL in custom PHP application and in my case when I use query builder select statement for example like:

->select(
         'roles.id as roleId',
                'roles.slug as roleSlug',
                'roles.name as roleName',)

in the result array, keys are like roleslug, rolename. Do I need to add some configuration to avoid lowering the aliases by doctrine? I found nothing in the doctrine documentation related to that

Bogdan Dubyk
  • 4,756
  • 7
  • 30
  • 67

1 Answers1

2

This is related to PostgreSQL. Just wrap your select to doublequotes likes this:

->select(
         'roles.id as "roleId"',
                'roles.slug as "roleSlug"',
                'roles.name as "roleName"',)
grachevko
  • 21
  • 3