Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

function lower(uuid) does not exist #1101

Open
Jarod-MIDY opened this issue Nov 22, 2023 · 0 comments
Open

function lower(uuid) does not exist #1101

Jarod-MIDY opened this issue Nov 22, 2023 · 0 comments

Comments

@Jarod-MIDY
Copy link

Jarod-MIDY commented Nov 22, 2023

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);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant