Skip to content

Is it possible to make events fire in the MANY_MANY join table? #37

@mikewalen

Description

@mikewalen

Fantastic Behavior BTW.

Saving records in a MANY_MANY relationship works really well. In my particular case, I have a couple of behaviors attached to my MANY_MANY join/intermediate table that need to run code in the beforeSave and afterSave events (e.g. I have a timestamp behavior that needs to add a created and modified date to the join table).

Is there any way that I can get these events to fire when doing a MANY_MANY save?

I see at line 156 in the EActiveRecordRelationBehavior.php you use a CDBCommandBuilder insert command to insert records to the MANY_MANY join table, but I cant seem to figure out what I would need to add/change to get the events to fire.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions