Closed dbu closed 11 years ago
@dbu just to make things a bit more clear, I didn't build this on top of doctrine/common, but just on top of my head while in the train with no connection
ObjectManager
- I removed a lot of API, and the ObjectManager
itself is not capable of loading objects anymore, that's up to the repositoryObjectRepository
- now only implements get
, add
and remove
(works like a collection). For more complex selects, the Selectable
interface from doctrine/collections
should be usedObjectLoader
is an implementation detail - it just allows to load an object from any persistence layer given an identifier or some criteria, then throws those objects at the UnitOfWork
for management.UnitOfWork
has nothing to do with persistence anymore, it just tracks changes and passes them to a given Committer
, which is then responsible for flushing stuff to the persistence layer of choice. Repositories do all the "fetching data" work (even for proxies)ObjectRepository
may or may not depend on an ObjectLoader
. A default repository would indeed use an ObjectLoader
, but that's really up to the user.Ignore the open PR, gonna close it now. Preliminary docs is also a good idea, I'm waiting for others' feedback to see if this is a dead project first :P
thanks for the clarifications. it feels like a lot of classes - but ultimately i would expect this to be more understandable than just 3 monster classes (they only look simple until you open them :-)
Being handled in #8
great initiative! the UoW is a really bloated uber-class in doctrine and i am always afraid when touching it.
this looks quite well to me. i wonder why you define ObjectManager and ObjectRepository and ObjectLoader? is that not already in doctrine commons? and does this need to be part of the UoW? i guess the UoW does have to interact with the actual loading and storing of the data. but the ObjectManager is on a layer above the UoW if i understand correctly. how do ObjectLoader and ObjectRepository interact?
should i also look at the open pull request? seems to be the place where we actually talk about calculating changesets...
if you could write a preliminary doc that explains how the library is used and what the entry points are, that would certainly help further understanding it...