I'm working with Doctrine2, and have a entity containing a string property that represents a WKT geometry:
class Entity {
/** @Column(type="string") */
protected $wkt;
}
I'd like to have this field transparently saved to a GEOMETRY field in the database, as such:
INSERT INTO ... VALUES(GeomFromText(?))
SELECT AsText(field) FROM ...
I had a look at the custom mapping types, but couldn't find where to apply such an SQL function.
Any idea?