Should a collection of objects also be responsible for creating new objects?
Let me explain. I have two classes, PhoneCall and PhoneCallList. PhoneCallList is a collection of PhoneCall objects. Our architect and I are at odds on how to go about creating new PhoneCall objects. Currently the PhoneCall object has a method called Create that adds the record to the database and the PhoneCallList object has a method called Add which adds a PhoneCall to the list.
The architect wants to have the Add method in the PhoneCallList also create the new record in the database and add it to the collection. Is doing it this way violating the Single Responsiblility Principle? To me it feels like this is not the best way to go about this.
Which is the best way to do it?
*Neither object has knowledge of the DB. The call service that takes care of all of the data access. The question is should the PhoneCall or PhoneCallList object be calling the service that does the data access?