php - FOSElasticaBundle mapping array -
i try add mapped field elastica
mapping config:
persistence: driver: orm model: placebuundle\entity\place finder: ~ provider: ~ listener: ~ ..... activeportals : type: object properties : id: type: integer portalssort: type: object properties: id: ~ value: ~
in entity
public function getportalssort(){ return array( array('id'=>1,'value'=>10) ); }
error
[symfony\component\propertyaccess\exception\nosuchpropertyexception] cannot read property "id" array. maybe intended write property path "[id]" instead.
there no type: array
what easiest way map array values ?
Comments
Post a Comment