I have an embedded document in my Doctrine ODM Document when I run this command
php app/console fos:elastica:populate
I get this Error :
Object of class ng\myBundle\Document\Coordinates could not be converted to string in /usr/share/nginx/www/project/vendor/friendsofsymfony/elastica-bundle/FOS/ElasticaBundle/Transformer/ModelToElasticaAutoTransformer.php on line 139
what seems to be the problem, officers ?
Code from 137 to 141 :
if ($v instanceof \DateTime) {
$v = $v->format('c');
} elseif (!is_scalar($v) && !is_null($v)) {
$v = (string)$v;
}
my mapping:
mappings:
title: { boost: 5 }
coordinates: {type:geo_point,lat_lon:true, boost: 5 }