Fixed: Accompanyingperiod / comment: order by newest to oldest

This commit is contained in:
2023-06-21 13:33:29 +02:00
parent 45724100d4
commit 146103e87c
2 changed files with 11 additions and 2 deletions

View File

@@ -185,7 +185,9 @@ class AccompanyingPeriod implements
* cascade={"persist", "remove"},
* orphanRemoval=true
* )
* @ORM\OrderBy({"createdAt": "DESC", "id": "DESC"})
* @Assert\NotBlank(groups={AccompanyingPeriod::STEP_DRAFT})
* @var Collection<Comment>
*/
private Collection $comments;
@@ -705,10 +707,11 @@ class AccompanyingPeriod implements
->comments
->filter(
static fn (Comment $c): bool => $c !== $pinnedComment
);
)
;
}
public function getCreatedAt(): ?DateTime
public function getCreatedAt(): DateTimeInterface
{
return $this->createdAt;
}