Feature Request
| Q |
A |
| New Feature |
yes |
| RFC |
no |
| BC Break |
no |
Summary
When declaring a type on a property, this should act as a default for field type or ManyToOne/OneToOne targetEntity.
class User
{
/** @ORM\Column */
public int $id; // defaults to type="integer"
/** @ORM\ManyToOne */
public Email $email; // defaults to targetEntity=Email::class
}
The relevant code would be in ClassMetadataInfo::mapField, mapManyToOne and mapOneToOne. Whenever type or targetEntity is missing, it could look this up in reflection property instead if it has a type.