4
简化版,工作
我不能让工作在奏鸣曲管理上市分拣一个实体,这里是我的实体:奏鸣曲管理员 - “ORDER BY”为实体
class User extends BaseUser {
/**
* @ORM\ManyToOne(targetEntity="Region", inversedBy="users")
*/
protected $preferredRegion;
}
这里是configureListFields定义:
protected function configureListFields(ListMapper $listMapper) {
$listMapper->add('preferredRegion', NULL, array('label' => 'Preferred Region', 'sortable' => 'preferredRegion'))
}
当表头列一下我的实体名称进行排序它,我得到这个错误:
一个例外模板的渲染(“[语义埃罗期间被扔r] line 0,col 25 near'AS__order_by':Error:Entity \ User has no field or association named AS“)
我该如何使这种排序方式适用于实体,以便按照我的实体名称?
谢谢
朱利安Mancera
谢谢你,谢谢你,工作! – manxon