mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-12-30 00:46:15 -06:00
fix join statement
This commit is contained in:
parent
fc9f99666e
commit
be0982ee87
1 changed files with 2 additions and 1 deletions
|
|
@ -37,7 +37,7 @@ func init() {
|
||||||
// the status they reference.
|
// the status they reference.
|
||||||
if err := tx.NewSelect().
|
if err := tx.NewSelect().
|
||||||
Model(&edits).
|
Model(&edits).
|
||||||
Join("? AS ? ON ? = ?",
|
Join("JOIN ? AS ? ON ? = ?",
|
||||||
bun.Ident("statuses"),
|
bun.Ident("statuses"),
|
||||||
bun.Ident("status"),
|
bun.Ident("status"),
|
||||||
bun.Ident("status.id"),
|
bun.Ident("status.id"),
|
||||||
|
|
@ -47,6 +47,7 @@ func init() {
|
||||||
bun.Ident("status.edits"),
|
bun.Ident("status.edits"),
|
||||||
"%", bun.Ident("status_edit.id"), "%",
|
"%", bun.Ident("status_edit.id"), "%",
|
||||||
).
|
).
|
||||||
|
Column("id", "status_id", "created_at").
|
||||||
Scan(ctx, &edits); err != nil {
|
Scan(ctx, &edits); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue