Pass thru context to a datatype definition #6085

Closed
opened 2026-01-22 15:26:33 +01:00 by admin · 1 comment
Owner

Originally created by @javi-p-nt on GitHub (Oct 18, 2018).

Originally assigned to: @Ocramius on GitHub.

Feature Request

Q A
New Feature yes
RFC no
BC Break no

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.

Originally created by @javi-p-nt on GitHub (Oct 18, 2018). Originally assigned to: @Ocramius on GitHub. ### Feature Request <!-- Fill in the relevant information below to help triage your issue. --> | Q | A |------------ | ------ | New Feature | yes | RFC | no | BC Break | no #### 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.
admin added the New FeatureWon't FixQuestion labels 2026-01-22 15:26:33 +01:00
admin closed this issue 2026-01-22 15:26:33 +01:00
Author
Owner

@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.

@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.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#6085