Answer the question
In order to leave comments, you need to log in
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
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question