dbal icon indicating copy to clipboard operation
dbal copied to clipboard

Problem with TEXT type in MSSQL due to VARCHAR(MAX) instead of NVARCHAR(MAX)

Open cfales opened this issue 9 years ago • 8 comments

The below issue was set for milestone 2.5.2 but was marked as Closed - Incomplete. DBAL-1233: TEXT type in MSSQL should be NVARCHAR(MAX) not VARCHAR(MAX)

To my knowledge the issue remains (as there are other similar problems reported eg. DBAL-1823: Doctrine2 + pdo_sqlsrv the createQueryBuilder() Order By with varchar field does not work)

This is an issue that is affected our deployment.

Could someone have a look and see if this is a problem that can be addressed in an update?

cfales avatar Feb 18 '16 23:02 cfales

+1

mwey avatar Dec 06 '16 07:12 mwey

Ref: https://github.com/doctrine/dbal/issues/1182

Ocramius avatar Dec 06 '16 14:12 Ocramius

Ref: https://github.com/doctrine/dbal/issues/1351

Ocramius avatar Dec 06 '16 14:12 Ocramius

https://github.com/doctrine/dbal/blob/master/lib/Doctrine/DBAL/Schema/SQLServerSchemaManager.php#L75

Introduced here https://github.com/doctrine/dbal/commit/56c0806d08d605d46cbb7cacb6b2254cb48c061f by @deeky666

Could this be fixed by just switching varchar to nvarchar? Or is there a reason why varchar was used?

PatrickLouys avatar Dec 06 '16 15:12 PatrickLouys

+1

rwitchell avatar Aug 21 '18 02:08 rwitchell

Is there an update on this issue? The pull request #3262 was closed without being merged, but I don't quite understand why.

hockdudu avatar Dec 30 '21 09:12 hockdudu

@hockdudu looks like the original author deleted their fork, hence why the PR was closed.

Send one WITH a test, and then it shall be considered.

Ocramius avatar Dec 30 '21 09:12 Ocramius