Closed finnhodgkin closed 7 years ago
With an extra preload: [author: a]
Ecto doesn't show duplicate results :+1:
from b in Book,
preload: [:request, :book_loan],
where: ilike(b.title, ^"%#{title}%"),
join: a in assoc(b, :author),
where: ilike(a.author, ^"%#{author}%"),
preload: [author: a]
When searching for books that have multiple authors by title only, a result is shown for each book: