mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
Generated entity with MAX length are translated by 0 #5233
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ajira86 on GitHub (Aug 25, 2016).
Hello,
In the context of a large project, I generated multiple entities from a MS SQL database.
I notice that all fields nvarchar(MAX) were translated in annotation attribute length=0 like this:
Shouldn't be better to remove the length limit in this case ?
@Ocramius commented on GitHub (Aug 25, 2016):
@ajira86 a removed length would result in a
length=255by default. Also, seems like a schema introspection issue. Can this be isolated into the DBAL code that causes it, and then reported there in more detail?@ajira86 commented on GitHub (Aug 29, 2016):
Thank you for your reply, I was not excepting this default value.
How can I get this kind of report ?
FYI: I'm using Symfony and the module leaseweb/doctrine-pdo-dblib as DBAL driver for the use of FreeTDS
@Ocramius commented on GitHub (Aug 29, 2016):
@ajira86 you'd need to debug it and figure out what the
DatabaseDriverdoes, then figure out if theMAXis cast to0by the DBAL or by the driver itself.