Fixed showing of author ids

Signed-off-by: kolaente <konrad@kola-entertainments.de>
This commit is contained in:
konrad 2017-10-11 21:47:50 +02:00 committed by kolaente
parent 9644f2304f
commit 55038bbb2b
1 changed files with 1 additions and 0 deletions

View File

@ -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)