diff --git a/src/Entity/Vehicle.php b/src/Entity/Vehicle.php index 99ec7779..a93bed4e 100644 --- a/src/Entity/Vehicle.php +++ b/src/Entity/Vehicle.php @@ -56,6 +56,7 @@ class Vehicle // link to batteries compatible with this vehicle /** * @ORM\ManyToMany(targetEntity="Battery", mappedBy="vehicles", indexBy="id", fetch="EXTRA_LAZY") + * @ORM\OrderBy({"sell_price" = "DESC"}) */ protected $batteries;