Skip to content

Wrong "from" statement if delete query with query builder #3601

Closed
@NikitaKharkov

Description

Bug Report

Invalid forming delete SQL part when I set table name in the from SQL part.

Q A
BC Break no
Version v2.9.2

Summary

So, easy example:

$qb->delete()
    ->from($tableName)
    ->where('uuid IN (:uuids)')
    ->setParameter('uuids', $uuids)
    ->execute();

Current behaviour

I got next structure (dump of $sqlParts)

...
  "from" => array:1 [
    0 => array:2 [
      "table" => "some_table_name"
      "alias" => null
    ]
  ]
...

How to reproduce

Just write a query with any table

Expected behaviour

instead of this (this is correctly formed if I put $tablename in delete SQL part )

...
  "from" => array:2 [
    "table" => "some_table_name"
    "alias" => null
  ]
...

Activity

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

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions