我有这样的代码(.yml):
oneToMany:
products:
targetEntity: SMS\Bundle\SwiadczeniaPlatne\Domain\Zlecenie\Produkt
mappedBy: zlecenie
cascade: [persist, remove]
indexBy: id
orphanRemoval: true
orderBy: { patient: ASC, contract: ASC }
患者和合同是对象。我想通过patient.name和contract.name对产品进行排序。我怎么能这样做?
答案 0 :(得分:0)
格式错误:
oneToMany:
products:
targetEntity: SMS\Bundle\SwiadczeniaPlatne\Domain\Zlecenie\Produkt
mappedBy: zlecenie
cascade: [persist, remove]
indexBy: id
orphanRemoval: true
orderBy:
patient: ASC
contract: ASC
为此doctrine2实体添加书签yaml参考要点:https://gist.github.com/mnapoli/3839501