[eluser]emorling[/eluser] I feel that there's something obvious here that I'm missing....
Let's say I have a shelf with a number of books. What's the easiest way to find out if the shelf has a SPECIFIC book? Now I loop thru all the books on the shelf, but this seems rather inefficient...
Code:
$book = new Book();
$book->get_by_id(1);
foreach ($shelf->book->all as $b){
if($b==$book){
// found the book, do something useful
}
}