mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
DDC-1289: orm:generate-entities create incorrect setters for ManyToOne and OneToOne #1619
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 (Jul 23, 2011).
Originally assigned to: @beberlei on GitHub.
Jira issue originally created by user matthewmatician:
When using the CLI tool to generate entities, ManyToOne setters are not being written correctly when the key-field is allowed to be null.
For example, on this annotation:
the following method is created:
HOWEVER: the method declaration should be like this:
This allows for setting null values without throwing an error. As it is currently, this is only correct when the annotation includes @joinColumn(... nullable=false)