Given that you have a domain model with simple relationships between parents and children, and each object has its own DAO, for example:
Author
AuthorDAO
Book
BookDAO
If I want to add a DAO method for extracting books by a specific author, what is the best place for it?
class AuthorDAO
{
List<Book> getBooks(Author author);
}
or
class BookDAO
{
List<Book> getBooks(Author author)
}
source
share