You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Talk (Represents a expert talk (webinar) where normal users can participate in video calls)
Expert (Represents the expert holding the webinar and presenting the course in the call)
TalkSubscription (Represents participations to a talk with the logged in user IDs)
Relations are as follows:
Talk< OneToMany >TalkSubscription (1 talk can have multiple subscriptions. But 1 subscription can only have 1 talk)
Talk< ManyToOne >Expert (1 talk can only have 1 expert. But 1 expert can have multiple talks)
I am on the crud controller of TalkSubscription and I want to display 2 AssociationField columns:
I want to show the associated talk: TalkSubscription -> Talk
I want to show the talk's associated expert: TalkSubscription -> Talk -> Expert (Transitive relation)
I made it by configuring the fields as following:
publicfunctionconfigureFields(string$pageName): iterable
{
return match ($pageName) {
Crud::PAGE_INDEX, Crud::PAGE_DETAIL => [
IdField::new('ssoUserId')->setFormType(UuidType::class),
AssociationField::new('talk'),
// Seems like the the controller explicitly needs to be set for the transitive relation. // Otherwise, exception occursAssociationField::new('talk.expert')->setCrudController(ExpertCrudController::class),
],
default => []
};
}
This works fine. But as soon as I open filters, I get this exception:
Symfony\Component\PropertyAccess\PropertyAccessor::getValue(): Argument #1 ($objectOrArray) must be of type object|array, null given, called in /var/www/web-backoffice-expert-talk/vendor/easycorp/easyadmin-bundle/src/Field/Configurator/AssociationConfigurator.php on line 123
This is my filter setup. Nothing special at the moment:
Describe the bug
I have 3 entities:
Talk
(Represents a expert talk (webinar) where normal users can participate in video calls)Expert
(Represents the expert holding the webinar and presenting the course in the call)TalkSubscription
(Represents participations to a talk with the logged in user IDs)Relations are as follows:
Talk
< OneToMany >TalkSubscription
(1 talk can have multiple subscriptions. But 1 subscription can only have 1 talk)Talk
< ManyToOne >Expert
(1 talk can only have 1 expert. But 1 expert can have multiple talks)I am on the crud controller of
TalkSubscription
and I want to display 2AssociationField
columns:TalkSubscription
->Talk
TalkSubscription
->Talk
->Expert
(Transitive relation)I made it by configuring the fields as following:
This works fine. But as soon as I open filters, I get this exception:
This is my filter setup. Nothing special at the moment:
Only when removing the transitive
AssociationField::new('talk.expert')
field from my field configuration, the filter is working.(OPTIONAL) Additional context
This is the AJAX response (StatusCode 500) from the filters:
The text was updated successfully, but these errors were encountered: