DDC-6: Dont use 'length' metadata attribute for anything other than string types. #7

Closed
opened 2026-01-22 12:23:58 +01:00 by admin · 2 comments
Owner

Originally created by @doctrinebot on GitHub (Sep 14, 2009).

Originally assigned to: @guilhermeblanco on GitHub.

Jira issue originally created by user romanb:

Changeset 6348 seems to make use of the 'length' attribute for decimals. This is very confusing and was not intended. As mentioned in several places 'length' should only apply to string-valued columns and indicate the desired (maximum) string length.

This is the problematic change:

OLD: ? 10 : $columnDef['precision'];
NEW: ? (( ! isset($columnDef['length']) ](| empty($columnDef['length'))) ? 10 : $columnDef['length']) : $columnDef['precision'];

Needs to be reverted to OLD.

Originally created by @doctrinebot on GitHub (Sep 14, 2009). Originally assigned to: @guilhermeblanco on GitHub. Jira issue originally created by user romanb: Changeset 6348 seems to make use of the 'length' attribute for decimals. This is very confusing and was not intended. As mentioned in several places 'length' should only apply to string-valued columns and indicate the desired (maximum) string length. This is the problematic change: OLD: ? 10 : $columnDef['precision']; NEW: ? (( ! isset($columnDef['length']) ](| empty($columnDef['length'))) ? 10 : $columnDef['length']) : $columnDef['precision']; Needs to be reverted to OLD.
admin added the Bug label 2026-01-22 12:23:58 +01:00
admin closed this issue 2026-01-22 12:23:59 +01:00
Author
Owner

@doctrinebot commented on GitHub (Sep 14, 2009):

Comment created by romanb:

[Comment from guilhermeblanco:]

Sure, and I completely agree with that.

Point is that SchemaManagers? are not good code (needs rewrite/optimization) to correctly distinguish between datatypes. As already mentioned in #2489, they should be ported to ORM (or Common) and optimized to our specific needs. Currently it's a piece of ORM specific code messed inside the DBAL layer.

Once we meet each other online we can discuss about the issue.

@doctrinebot commented on GitHub (Sep 14, 2009): Comment created by romanb: [Comment from guilhermeblanco:] Sure, and I completely agree with that. Point is that SchemaManagers? are not good code (needs rewrite/optimization) to correctly distinguish between datatypes. As already mentioned in #2489, they should be ported to ORM (or Common) and optimized to our specific needs. Currently it's a piece of ORM specific code messed inside the DBAL layer. Once we meet each other online we can discuss about the issue.
Author
Owner

@doctrinebot commented on GitHub (Oct 23, 2009):

Issue was closed with resolution "Fixed"

@doctrinebot commented on GitHub (Oct 23, 2009): Issue was closed with resolution "Fixed"
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#7