Skip to content

function lower(uuid) does not exist #1101

Description

@Jarod-MIDY

I was trying to set a permanent filter on a joincolumn, the joined entity uses UUID as primary key.

I encountered 2 problems

First, in APY\DataGridBundle\Grid\Source\Entity, a use APY\DataGridBundle\Grid\Column\JoinColumn; was missing so every if ($variable instanceof JoinColumn) were always false.

Second I now have the following error : An exception occurred while executing a query: SQLSTATE[42883]: Undefined function: 7 ERROR: function lower(uuid) does not exist as if it's trying to lowercase the UUID object coming from my PGSQL DataBase

here is my code

$source = new Entity(Notification::class);
$this->grid->setSource($source);
$this->grid->addColumn(new JoinColumn([
                'id' => 'recipient',
                'title' => 'recipient',
                'field' => "recipient",
                'filterable' => true,
                'sortable' => false,
                'visible' => false,
                'source' => true,
                'columns' => ['id'] //This id is a symfony UUID object
            ]), 0);

$this->grid->setPermanentFilters([
            'recipient' => $user->getId()->__toString(),
        ]);

return $this->grid->getGridResponse($template, $templateParams);

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions