{"action":"opened","issue":{"url":"https://api.github.com/repos/nextras/orm/issues/303","repository_url":"https://api.github.com/repos/nextras/orm","labels_url":"https://api.github.com/repos/nextras/orm/issues/303/labels{/name}","comments_url":"https://api.github.com/repos/nextras/orm/issues/303/comments","events_url":"https://api.github.com/repos/nextras/orm/issues/303/events","html_url":"https://github.com/nextras/orm/issues/303","id":354155255,"node_id":"MDU6SXNzdWUzNTQxNTUyNTU=","number":303,"title":"Can access ","user":{"login":"japlavaren","id":2458479,"node_id":"MDQ6VXNlcjI0NTg0Nzk=","avatar_url":"https://avatars0.githubusercontent.com/u/2458479?v=4","gravatar_id":"","url":"https://api.github.com/users/japlavaren","html_url":"https://github.com/japlavaren","followers_url":"https://api.github.com/users/japlavaren/followers","following_url":"https://api.github.com/users/japlavaren/following{/other_user}","gists_url":"https://api.github.com/users/japlavaren/gists{/gist_id}","starred_url":"https://api.github.com/users/japlavaren/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/japlavaren/subscriptions","organizations_url":"https://api.github.com/users/japlavaren/orgs","repos_url":"https://api.github.com/users/japlavaren/repos","events_url":"https://api.github.com/users/japlavaren/events{/privacy}","received_events_url":"https://api.github.com/users/japlavaren/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-08-27T02:09:26Z","updated_at":"2018-08-27T02:09:26Z","closed_at":null,"author_association":"NONE","body":"Hi, \r\n\r\nI have problem when I am trying to call repository function from related entity. Is this not possible, or I am doing something wrong?\r\n\r\nWhen I am calling `$userEntity->unverifiedShortRegistrations` I am getting error:\r\n```\r\nMemberAccessException: Call to undefined method Nextras\\Orm\\Mapper\\Dbal\\DbalCollection::findAllUnverified().\r\n```\r\n\r\nI here I have relation to `ShortRegistrationEntity` inside `$allShortRegistrations` and I am trying to create virtua to get only verified ones. Method `findAllUnverified()` is defined in `ShortRegistrationRepository` attached bellow:\r\n```\r\n/**\r\n * @property int $id {primary}\r\n * @property OneHasMany|ShortRegistrationEntity $allShortRegistrations {1:m ShortRegistrationEntity::$user}\r\n * @property OneHasMany|ShortRegistrationEntity $unverifiedShortRegistrations {virtual}\r\n */\r\nclass UserEntity extends Entity\r\n{\r\n    protected function getterUnVerifiedShortRegistrations(): ICollection\r\n    {\r\n        return $this->allShortRegistrations->get()->findAllUnverified();\r\n    }\r\n}\r\n```\r\n`ShortRegistrationEntity` with relation to `UserEntity`:\r\n```\r\n/**\r\n * @property int $id {primary}\r\n * @property bool $verified\r\n * @property UserEntity $user {m:1 UserEntity::$allShortRegistrations}\r\n */\r\nclass ShortRegistrationEntity extends Entity\r\n{\r\n}\r\n```\r\nAnd `ShortRegistrationRepository` with method which I want to call:\r\n```\r\nclass ShortRegistrationRepository extends Repository\r\n{\r\n    public static function getEntityClassNames(): array\r\n    {\r\n        return [ShortRegistrationEntity::class];\r\n    }\r\n\r\n    public function findAllUnverified(): ICollection\r\n    {\r\n        return $this->findBy(['verified' => false]);\r\n    }\r\n}\r\n```\r\n"}}
{"actor":{"display_login":"japlavaren"}}