I want to write a GIS (geospatial data) extension for my Doctrine 2 project.
I know how to write simple custom functions and types. In order to accommodate the MySQL special storage format, I need to use some SQL function (GeomFromWKB() and AsBinary()) when retrieving/storing data.
I can’t find a place where I tell Doctrine 2 this. As I see it, the convertToPHPValue() and convertToDatabaseValue() methods are not the right place.
What I found out so far:
According to the IRC channel, convertToPHPValueSQL() and convertToDatabaseValueSQL() will be part of the next release, and will offer the functionality required. Once that is available, defining a CustomType is fairly straightforward.