Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AdapterInterface should reflect CRUD semantics #2

Open
codeliner opened this issue May 22, 2014 · 0 comments
Open

AdapterInterface should reflect CRUD semantics #2

codeliner opened this issue May 22, 2014 · 0 comments

Comments

@codeliner
Copy link

Hi,

I'm looking for a flexible zf2 CRUD module for RAD prototyping. Your module seems to be a perfect candidate for the job. I love the seperation of entity and model definition and the CrudManager with it's related sub managers.
I want to connect an EventStore with a CRUD-ish middleware via CQRS. A CqrsAdapter should delegate CreateEntity, UpdateEntity and RemoveEntity commands to a command bus and in the simplest case generic command handlers would handle them and pass them to event sourced entities. This is the theory, but I've a problem with the AdapterInterface. It looks like it is designed to support doctrine or an ORM in general. The CRUD information get lost cause the AdapterInterface only defines a persist method. Seperated create/insert and update methods would be helpful, otherwise I need to introduce an idntity map or ask my read model if it already knows the entity.

What do you think? Would it be ok to change it? I can do it and send you a pull request. Would be much faster than write my own module but maybe it is a BC break if other adapters exist outside your module.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant