A
A
Alexey Alekseev2020-09-06 19:56:29
symfony
Alexey Alekseev, 2020-09-06 19:56:29

How to access a field of type Geography using Doctrine?

Hello!
MS SQL Server 2012. There is a table with a Geography type field.
It is necessary to add and read values ​​from a field of this type through Doctrine.
There is no such type in Doctrine 2.5 ( php bin/console Doctrine:mapping:import --force AppBundle annotation -> Unknown database type geography requested, Doctrine\DBAL\Platforms\SQLServer2008Platform may not support it.).

How can you befriend them?
Thank you!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry, 2020-09-06
@remlin1000

You can write your own mapping type.
The doctrine documentation has an example for the Point type from mysql https://www.doctrine-project.org/projects/doctrine... . You will have a similar implementation

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question