T
T
theand12019-10-10 19:17:33
symfony
theand1, 2019-10-10 19:17:33

How to specify two columns for order by in an entity in Symfony?

/**
     * @var Collection|Image[]
     * @ORM\OneToMany(targetEntity="Image", mappedBy="product", cascade={"persist"}, orphanRemoval=true)
     * @ORM\OrderBy({"mainImg" = "DESC"} <b>нужно сдесь еще указать вторую колонку, чтоб и по одной и по другой</b>) 
     */
    private $images;

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
postgresdev, 2019-10-10
@theand1

https://stackoverflow.com/a/12496083/6355394

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question