how to sort an entity's arrayCollection in symfony2

后端 未结 4 1720
借酒劲吻你
借酒劲吻你 2021-02-01 15:33

I have an entity \"container\" with this property

/**
 * @ORM\\OneToMany(targetEntity=\"BizTV\\ContentManagementBundle\\Entity\\Content\", mappedBy=\"container\"         


        
4条回答
  •  借酒劲吻你
    2021-02-01 16:10

    You can write

    @ORM\OrderBy({"date" = "ASC", "time" = "ASC"})
    

    for multiple criteria ordering.

提交回复
热议问题