Hey,

I have a company entity with a one to many association to its opening hours.
Now i want to receive the opening hours of a company ordered by weekday. Is
it ok to write a method called findOpeningHours(Company $company) in the
company repository or should it be in the opening hours repository? 

I use a service layer in which i inject the different repository instances.
So in my CompanyService i would have a method called getOpeningHours(Company
$company) which uses the opening hours repository. If that would be the
right way, i would have to inject all the repositories for the different
associations of the company to my service. That could be a lot of :)

So would it be the best way to handle all these associations within the
company repository or is there a problem? 

Thanks in advance
Dominik



--
View this message in context: 
http://zend-framework-community.634137.n4.nabble.com/Doctrine-2-handle-associations-with-custom-repository-tp4661982.html
Sent from the Zend Framework mailing list archive at Nabble.com.

-- 
List: [email protected]
Info: http://framework.zend.com/archives
Unsubscribe: [email protected]


Reply via email to