我尝试将映射字段添加到elastica
映射配置:
persistence:
driver: orm
model: PlaceBuundle\Entity\Place
finder: ~
provider: ~
listener: ~
.....
activePortals :
type: object
properties :
id:
type: integer
portalsSort:
type: object
properties:
id: ~
value: ~
实体中的
public function getPortalsSort(){
return array(
array('id'=>1,'value'=>10)
);
}
错误
[Symfony\Component\PropertyAccess\Exception\NoSuchPropertyException]
Cannot read property "id" from an array. Maybe you intended to write the property path as "[id]" instead.
没有类型:array
映射数组值的最简单方法是什么?