Open peldax opened 2 weeks ago
Hi. If we talk about GeneratedValue attribute, then this attribute tells ORM that field is generated on the DB side. Orm adds a generated field into returning columns when insert or update. We can extend that attribute in the new one or extract an interface.
However I think it will be better to make a new attribute for virtual columns. For example:
#[ORM\VirtualColumn(type: 'int', expression: 'IF(xyz IS TRUE, 100, 200)', stored: true, typecast: 'int')
I have an idea!
Hi,
I would like to extend the functionality to support virtual generated columns.
In Doctrine it is possible using this explicit annotation:
Possibly the freshly added
GeneratedColumn
attribute might be used to support the functionality?I am open to bounty this feature.