mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
Pass thru context to a datatype definition #6085
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 @javi-p-nt on GitHub (Oct 18, 2018).
Originally assigned to: @Ocramius on GitHub.
Feature Request
Summary
Currently a datatype definition does not have context of the other fields to be converted.
Make case of DatatypeTZ definition on Mysql (which currently does not support), but could be achieved at database level using a datetime field and a timezone varchar field.
Current implementation of Datetime datatype cannot get the timezone field to hydrate a full fledged DatetimeTZ. passing a context as third parameter, could retrieve timezone field.
Using Lifecycle callbacks provoke the field to be reconstructed, and leading to trigger updatings without need.
@Ocramius commented on GitHub (Oct 18, 2018):
@ONiAd this is a scenario where an embeddable would be better suited. ORM v3 will probably have better support for N-fields-to-M-properties, but this is not to be solved with DBAL types for now, and won't be approached until we have the ORM v3 details required.