[PLUGIN][RepeatNote] Fix getRepeatNotes query
This commit is contained in:
parent
10e7c71b6e
commit
7407028891
@ -78,15 +78,15 @@ class NoteRepeat extends Entity
|
|||||||
|
|
||||||
public static function getNoteRepeats(Note $note): array
|
public static function getNoteRepeats(Note $note): array
|
||||||
{
|
{
|
||||||
return DB::sql(
|
return DB::dql(
|
||||||
<<<'EOF'
|
<<<'EOF'
|
||||||
select {select} from note n
|
select n from note as n
|
||||||
inner join note_repeat nr
|
inner join note_repeat as nr
|
||||||
on nr.note_id = n.id
|
with nr.note_id = n.id
|
||||||
where repeat_of = :note_id
|
where nr.repeat_of = :note_id
|
||||||
order by n.created DESC
|
order by n.created DESC, n.id DESC
|
||||||
EOF,
|
EOF,
|
||||||
['note_id' => $note->getId()]
|
['note_id' => $note->getId()],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user