This is just as an FYI, it took me a while to figure this out so I thought I would create a forum post to help someone else in the future.
I use UUID’s for my primary key. Not an issue until you create a URL like:
You expect Yii to assign the UUID to $id… Well you can with these routing rules:
'<controller:\w+>/<id:[\w-]+>' => '<controller>/view', '<controller:\w+>/<action:\w+>/<id:[\w-]+>' => '<controller>/<action>',
Hopefully this helps someone!
credit goes here: http://www.yiiframework.com/forum/index.php/topic/18412-new-yii-rest-tutorial/page__p__128241__hl__uuid+url#entry128241