mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
DDC-3157: [GH-1052] [DDC-3087] Add readonly attribute to Field ORM Mapping to avoid generating a setter #3913
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 (Jun 7, 2014).
Originally assigned to: @Ocramius on GitHub.
Jira issue originally created by user @doctrinebot:
This issue is created automatically through a Github pull request on behalf of cstea:
Url: https://github.com/doctrine/doctrine2/pull/1052
Message:
The change allows one to enter a field attribute called "readonly". What this does is when using doctrine:generate:entities, only a getter is generated, setter is omitted.
Example use on a created field that uses Timestampable and should not have a setter:
/****
* @var /DateTime $createdAt
*
* @Gedmo\Timestampable(on="create")
* @ORM\Column(type="datetime", readonly=true)
*/
private $createdAt;
@doctrinebot commented on GitHub (Jun 7, 2014):
Comment created by @doctrinebot:
A related Github Pull-Request [GH-1052] was closed:
https://github.com/doctrine/doctrine2/pull/1052
@doctrinebot commented on GitHub (Jun 7, 2014):
Issue was closed with resolution "Won't Fix"