[DBAL-555] Table name is not quoted despite being a reserved word and being quoted in the annotation Created: 10/Jul/13  Updated: 24/Apr/14  Resolved: 21/Dec/13

Status: Resolved
Project: Doctrine DBAL
Component/s: None
Affects Version/s: None
Fix Version/s: 2.5
Security Level: All

Type: Bug Priority: Major
Reporter: mikeSimonson Assignee: Benjamin Eberlei
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Duplicate
is duplicated by DBAL-802 Tablename quoting not working for ALT... Resolved

 Description   

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.



 Comments   
Comment by Steve Müller [ 20/Nov/13 ]

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.

Comment by mikeSimonson [ 22/Nov/13 ]

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

Generated at Thu Oct 30 15:06:21 UTC 2014 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.