Closed japlavaren closed 6 years ago
Relationships' get() method (allShortRegistrations->get()
) returns ICollection
instance, not a IRepostory
instance. It's up to you re-use somehow (ICollection filtering) logic between repository and the entity. This is wanted behavior, when relationship is modified and not persisted, you will receive ArrayCollection and you will work with PHP's collection.
Hi,
I have problem when I am trying to call repository function from related entity. Is this not possible, or I am doing something wrong?
When I am calling
$userEntity->unverifiedShortRegistrations
I am getting error:I here I have relation to
ShortRegistrationEntity
inside$allShortRegistrations
and I am trying to create virtua to get only verified ones. MethodfindAllUnverified()
is defined inShortRegistrationRepository
attached bellow:ShortRegistrationEntity
with relation toUserEntity
:And
ShortRegistrationRepository
with method which I want to call: