We have a resolving table of UserRole which has a primary key made up of id_user AND id_role.
How would this be correctly modelled as a resource?
I've tried BelongsTo relations but these don't seem restrictive of the update. When deleting a record it deletes all of the records for one half of the key ie its executing delete from userrole where id_user = 1 rather than delete from userrole where id_user = 1 AND id_role = 1