tags:

views:

10

answers:

1

I have 2 entities: Article Category

I created the mappings so both entities have each others as collections, so:

Article.Categories Category.Articles

Now, I want to create a method in either ArticleDAO or CategoryDAO to return a paged (subset) of articles.

Which DAO makes sense?

Since the article entity has categories as its collection, does it still make sense to add the method to the articleDAO?

A: 

A method that returns a list of Articles should go in your ArticleDAO, regardless of what its properties are.

Diego Mijelshon