Fixed showing of author ids
Signed-off-by: kolaente <konrad@kola-entertainments.de>
This commit is contained in:
parent
9644f2304f
commit
55038bbb2b
|
@ -37,6 +37,7 @@ func GetBookById(ID int64) (book Book, exists bool, err error) {
|
|||
var authors []Author
|
||||
err = x.
|
||||
Table("authors_books").
|
||||
Select("authors.*").
|
||||
Join("INNER", "authors", "authors_books.author_id = authors.id").
|
||||
Where("book_id = ?", book.ID).
|
||||
Find(&authors)
|
||||
|
|
Loading…
Reference in New Issue