Thinking on a repository and aggregate. The literature say that there is one repository per aggregate.
However if my aggregates are all sub classes of a base one (is-a relation, inheritance is not used for reuse). Do I have to create on repository for all sub classes or can I use the same repository for all.
PaperBag paperBag = paperBagsRepository.get(paperBagId);
PlasticBag plasticBag = plasticBagsRepository.get(plasticBagId);
Or
PaperBag paperBag = bagsRepository.get(paperBagId);
PlasticBag plasticBag = bagsRepository.get(plasticBagId);