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

Implement persist / flush in repository #58

Open
migo315 opened this issue Apr 15, 2020 · 0 comments
Open

Implement persist / flush in repository #58

migo315 opened this issue Apr 15, 2020 · 0 comments

Comments

@migo315
Copy link
Contributor

migo315 commented Apr 15, 2020

Maybe we should implement persist, remove and flush in repositories. So we don't have to inject the EntityManager only for a flush if we already injected a repository:

Current:

    public function __construct(
        DocumentManagerInterface $odm, # Only for persist and flush
        ProductRepository $productRepository,
    ) {
        $this->odm = $odm;
        $this->productRepository = $productRepository;
    }

Target:

    public function __construct(
        ProductRepository $productRepository,
    ) {
        $this->productRepository = $productRepository;
    }
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