I have two models: Book and Author
Book table has author_id and cover_color. Author table has id(primary key) and name
I want to have all the books that are red and their author's name is "John". Is it possible using activejdbc (without raw query) in one query? If so, how?? If not, what is the best way to do it?
the SQL equivalent is:
SELECT * FROM Books INNER JOIN Authors ON Books.author_id=Authors.id WHERE Books.cover_color='red' AND Authors.name='John'
Thanks in advance