Ocramius / ChangeSet

:vhs: A simple changeset list that supports operations like insert/update/delete, event triggering, commits and rollbacks
MIT License
68 stars 9 forks source link

Just a question for understanding the bundle #20

Open ElectricMaxxx opened 9 years ago

ElectricMaxxx commented 9 years ago

Hi,

Changeset means operation for comparing documents/entities which should be persisted or not, right? Or does it handle the mapping of objects inside the UoW too? To explain: in the doctrine-phpcr we have got two different identifiers - the path and the uuid. Mostly the path is used as identifiert to get documents, but ther are use cases (referencing), when the uuid is needed. So would like to see is a mapping mechanism independent from the identifier. Cause atm we would need to do things like: get...ById() or get...ByUuid()` - one mistake and a document get lost.

Ocramius commented 9 years ago

@ElectricMaxxx the idea is to implement a "identity map" object afterwards, which means that the UnitOfWork won't be responsible for tracking object identity anymore. Implementing a custom "identity map" may be the answer to your question.