Aggregate root & Repository dilemma

Posted by mateoc on Programmers See other posts from Programmers or by mateoc
Published on 2012-10-20T13:02:28Z Indexed on 2012/10/20 17:13 UTC
Read the original article Hit count: 259

Filed under:
|
|

I am in a big dilemma here.

I have a League, Team and Player entities. I have created a repo for the league only as a Team cannot exists without a League. At first I had bounded the players only with the team but then I realised I would have a problem with free agents so I also bounded the players to the league. Then I was wondering if a player could exists without a League or a Team and I am totally confused to that question.

So would you make a player repository or include them in the league repo?

Thanks

© Programmers or respective owner

Related posts about repository

Related posts about entity