mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
DDC-100: Default values are not escaped #124
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 @doctrinebot on GitHub (Nov 2, 2009).
Originally assigned to: @beberlei on GitHub.
Jira issue originally created by user nicokaiser:
When using default values for strings, they are not escaped properly when the DB schema is created.
@Column(name="name", type="string", length=50, default="Unknown User")
results in
CREATE TABLE users (..., name VARCHAR(50) DEFAULT Unknown User NOT NULL, ...)
which fails because "Unknown User" is not escaped.
@doctrinebot commented on GitHub (Nov 2, 2009):
Comment created by romanb:
The option for database default values might be removed but this is yet unclear.
Use PHP default values instead since that way you have the default value in your object (Doctrine wont go back to the DB just to get the DB-generated default value).
@doctrinebot commented on GitHub (Jan 19, 2010):
Comment created by romanb:
The default option should be removed once the columnDefinition is implemented. Database-level default values can then be set via the columnDefinition.
@doctrinebot commented on GitHub (Jan 23, 2010):
Comment created by @beberlei:
Hm Roman, one problem surfaced when i did a skip try to remove defaults in ClassMetadataInfo:
Two solutions:
@doctrinebot commented on GitHub (Jan 24, 2010):
Comment created by romanb:
@Benjamin: Nr. 1 would not reliably work. In the case of a timestamp, time configuration issues come to mind. So Nr.2 is the way to go. Just remove the support in the ORM layer.
@doctrinebot commented on GitHub (Jan 25, 2010):
Comment created by @beberlei:
will do, it is quite a no-brainer this way.
@doctrinebot commented on GitHub (Jan 26, 2010):
Comment created by @beberlei:
Default has been removed.
@doctrinebot commented on GitHub (Jan 26, 2010):
Issue was closed with resolution "Fixed"