We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When trying to run a query builder update, trying to update a value to false with the set() method, an error occurs
false
Same as the above, using an update/set query builder fails to run when using a false boolean
Throws an error due to the DQL not printing false as 0 or "false"
0
"false"
The error it throws
13:29:00 CRITICAL [messenger] Error thrown while handling message App\Scheduler\Message\StatusUpdater. Removing from transport after 0 retries. Error: "Handling "App\Scheduler\Message\StatusUpdater" failed: [Syntax Error] line 0, col 43: Error: Expected Literal, got 'WHERE'" ["class" => "App\Scheduler\Message\StatusUpdater","message_id" => null,"retryCount" => 0,"error" => "Handling "App\Scheduler\Message\StatusUpdater" failed: [Syntax Error] line 0, col 43: Error: Expected Literal, got 'WHERE'","exception" => Symfony\Component\Messenger\Exception\HandlerFailedException^ { …}]
A dump of the DQL
^ "UPDATE App\Entity\Product n SET n.isOnline = WHERE n.isOnline = true"
Have a basic entity with a boolean field
.... #[ORM\Column] private bool $isOnline = true; #[SerializedName('isOnline')] public function isOnline(): ?bool { return $this->isOnline; } #[SerializedName('isOnline')] public function setIsOnline(bool $isOnline): self { $this->isOnline = $isOnline; return $this; } ....
Run the following using the given repository
$this->repository->createQueryBuilder('n') ->update() ->set('n.isOnline', false) ->andWhere('n.isOnline = true') ->getQuery() ->execute();
The boolean should type cast to either a integer 1/0 or a string 'true'/'false'
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Bug Report
When trying to run a query builder update, trying to update a value to
false
with the set() method, an error occursSummary
Same as the above, using an update/set query builder fails to run when using a false boolean
Current behavior
Throws an error due to the DQL not printing false as
0
or"false"
The error it throws
A dump of the DQL
How to reproduce
Have a basic entity with a boolean field
Run the following using the given repository
Expected behavior
The boolean should type cast to either a integer 1/0 or a string 'true'/'false'
The text was updated successfully, but these errors were encountered: