Skip to content

Loading…

DBAL-555: Table name is not quoted despite being a reserved word and being quoted in the annotation #1764

Closed
doctrinebot opened this Issue · 4 comments

2 participants

@doctrinebot

Jira issue originally created by user mikesimonson:

When a reserved word is used as a table name the migration does half the job as far as the quoting is concerned.

The generated statement for the creation of the table doesn't work.
It generated:

CREATE TABLE Order .... # without quoting.

But when the table name is a reference in a foreign key it's ok.

ALTER TABLE Orders*Domains ADD CONSTRAINT FK_7FD78CA28D9F6D38 FOREIGN KEY (order*id) REFERENCES `Order` (id)
/****
 * @ORM\Table(name="`Order`")
 * @ORM\Entity
 */
class Order
{
}

I suppose that at some point the table name is unquoted but I didn't find out where.

@doctrinebot

Comment created by @deeky666:

Can you please tell which platform/driver you are using? Also the DBAL version would help tracking this down. But there has been done a lot of work concerning identifier quotation in the last months already so maybe this is already solved by 2.4?
Can you please reinvestigate? Thanks.

@doctrinebot

Comment created by mikesimonson:

Hi,

I was using doctrine-migration with the dbal 2.3.4.
How can I test for that before doctrine migration upgrade to the dbal 2.4

Thanks

@doctrinebot

Issue was closed with resolution "Fixed"

@doctrinebot doctrinebot added the Bug label
@beberlei beberlei was assigned by doctrinebot
@doctrinebot doctrinebot added this to the 2.5 milestone
@doctrinebot doctrinebot closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.