Skip to content
This repository has been archived by the owner on Jan 24, 2024. It is now read-only.

Add ability to create where statements based on related entity #6

Open
wolfy-j opened this issue Mar 29, 2017 · 1 comment
Open

Add ability to create where statements based on related entity #6

wolfy-j opened this issue Mar 29, 2017 · 1 comment

Comments

@wolfy-j
Copy link
Member

wolfy-j commented Mar 29, 2017

Example:

$user = $user->findOne();
//...
$posts->find()->where('author', $user);
@wolfy-j
Copy link
Member Author

wolfy-j commented Apr 2, 2017

This is important in order to be able repositories more efficient:

public function findByAuthor(User $user): RecordSelector
{
    return $this->findActive(['author' => $user]);
}

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

No branches or pull requests

1 participant