srayner / cobalt

PHP ZF2 Application for ICT Asset and Project Management
http://srayner.github.io/cobalt
3 stars 0 forks source link

You cannot remove hardware from users. #43

Closed srayner closed 8 years ago

srayner commented 8 years ago

The url for removing hardware from users contains the hardware id but not the user id.

We are not removing the hardware, just undoing the associataion with a users. So we need to do something like; $user->removeHardware($hardware), but we don't have a reference to user.

Current routing does not allow two id fields. (one for hardwareId, one for userId). There is no removeHardware() function in the user entity.

srayner commented 8 years ago

This has been resolved by encoding both userId and hardwareId into the one id route parameter.