In the DBIx::Class::Manual::Cookbook there's an example with an author/book seems like the database is somewhat like this:<br>
<br>
author<br>
authID int<br>
first_name varchar<br>
last_name varchar<br>
<br>
book2author<br>
authID int<br>
bookID int<br>
<br>
book<br>
bookID int<br>
title varchar<br>
...<br>
<br>
<br>
Now, if I know the title starts with foo% but want to limit my result to authors bar% I'd go like this in sql:<br>
<br>
SELECT a.*, b.* FROM book b, author a, book2author a2b <br>
WHERE (b.title LIKE 'foo%' AND a.first_name LIKE 'bar%') AND<br>
(b.bookID = a2b.bookID AND a.authID = a2b.authID<br>
<br>
I've two questions regarding this. First, how to do it? I can't find
much documentation and in the doc I've found haven't I found a way to
do a multi table join. Secondly where would be a sane place to put a
function like this? Would Book2Author.pm be the correct place since
it's the table connecting them?