Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Model events (C/S/U/D) not firing when acted on via a relation #10770

Closed
shaz-r opened this issue Oct 31, 2015 · 1 comment
Closed

Model events (C/S/U/D) not firing when acted on via a relation #10770

shaz-r opened this issue Oct 31, 2015 · 1 comment

Comments

@shaz-r
Copy link

shaz-r commented Oct 31, 2015

There's a few issue's that reference model events for related models; but in my use case I don't really need to know if it was an attach/associate/detach/pivot etc - I'd be very happy to have the basic saving/saved/updating/updated/creating/created/deleting/deleted events fire on the model that has been action on via a related model (wether that's via a ->relation()->save(), ->attach() etc).

Actually I'm not too sure if that should be happening already or not - but in my case it isn't.

To give context on my use case - I have a redis cache of ids that have a specific attribute; and these items are acted on both via a relation or on their own - I get the model events to update the redis cache but it only ever triggers when the model method is called on it's own (not via a relation).

@GrahamCampbell
Copy link
Member

I think this is intended? Ping @taylorotwell.

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

No branches or pull requests

2 participants