A question regarding the repository pattern and query object pattern. I'm using EF 4 and have generated my POCO classes from my database model using the ADO.NET POCO Entity Generator in VS 2010. The edmx file and the tt file (POCO classes) are in 2 different projects.
My repositories are domain specific, e.g DocumentRepository and UserRepository. My database model differs from my domain model in such a degree that I have implemented mappers in order to translate a domain object to one or more database tables (and vice versa). One example is that my Document domain class is modeled as 3 tables (and therefore POCO classes) in the database.
How would you implement the query object pattern when using domain objects in such a case? The way I see it I'll have to write the query object base on the POCO classes and not the domain classes? But wouldn't that break the repository pattern?