l5b-crud icon indicating copy to clipboard operation
l5b-crud copied to clipboard

Something is out of sync between the events and the listener

Open drjekyll opened this issue 5 years ago • 0 comments

My model is named Genre.

The events wind up referring to the plural: $this->genres = $genres;

but the GenreEventListener uses the singular $newitem = $event->genre->name;

This causes an error. Changing one or the other so that they match makes things work.

Given that it's an event for for a single entity, I would guess that the event code should use the singular instead of the plural.

drjekyll avatar May 08 '19 21:05 drjekyll