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

Repository should offer buildAndSet() and buildOrSet() without first needing to call createQuery() #10

Closed
devvoh opened this issue Jul 12, 2017 · 1 comment
Assignees
Milestone

Comments

@devvoh
Copy link
Owner

devvoh commented Jul 12, 2017

Currently, the following is needed to getByConditionSet():

$entityRepository = $this->toolkit->getRepository(\Model\Entity::class);

$entities = $entityRepository->returnOne()->getByConditionSet(
    $entityRepository->createQuery()->buildAndSet([
        ["primary_id", "=", 1],
        ["secondary_id", "=", 1],
    ])
);

The call to $entityRepository->createQuery()->buildAndSet() is awkward in use. Having to call createQuery for this is not intuitive and not easy to discover.

Change this to the following: $entityRepository()->buildAndSet() and simply proxy that onto the Query instance.

@devvoh devvoh self-assigned this Jul 12, 2017
@devvoh devvoh added this to the 0.12.5 milestone Jul 18, 2017
devvoh added a commit that referenced this issue Jul 22, 2017
@devvoh
Copy link
Owner Author

devvoh commented Jul 22, 2017

Should be fixed in 0.12.5!

@devvoh devvoh closed this as completed Jul 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant