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

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -