-
-
Notifications
You must be signed in to change notification settings - Fork 455
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: Add support for TypeFieldMapper #1696
Comments
I'd also like to be able to do this. In addition (or instead?) of configuring a service, this could support configuring the mapping directly: doctrine:
orm:
typed_fields:
App\My\CustomType: my_type Up to give it a try @adrianrudnik? |
@nicolas-grekas I hope I might have a free slot next week. I always get confused with this topic as Example for Symfony:
should this not be enough to auto-register stuff for the column definition so that For me CREATE DOMAIN mycustom AS JSONB; Looking at your PR, as far as I can understand it quickly, you want to "override" the hard mapping for
All Not sure I'm getting all of this correctly, just trying to find a common ground. |
In my case, I would:
|
Ah I see, yes, |
Related: #1595 PR welcome |
Bumping this as DatePoint is released but cannot be used as an entity's propriety for now. I would love to do a PR but I only see how to add |
Since doctrine/orm#10313 we now have a way to extend the automatic mapping of DBAL types.
Similar to
\Doctrine\ORM\Configuration::setNamingStrategy
there is now\Doctrine\ORM\Configuration::setTypedFieldMapper
, which is not yet configurable by this bundle afaik.It would be nice to have it configurable with a service, so we can extend it, like we have for the naming_strategy.
My current workaround to get custom types injected is rather cumbersome, and I'm not even sure if my way is to complicated and there is a much easier way to achieve this. I had to circumvent a lot of private service dependencies to get near the configuration stuff, while preserving all injections:
The text was updated successfully, but these errors were encountered: