Yii Framework Forum: Inconsistancy in yiic shell, crud - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Inconsistancy in yiic shell, crud Rate Topic: -----

#1 User is offline   meanpenguin 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 20
  • Joined: 08-November 08

Posted 26 November 2008 - 02:31 PM

I have a database table  HAND_INSTALLS with columns ID, APPLICATION_NAME.
in yiic shell,
>> model Hand_Installs
>> crud Hand_Installs

What is created:
In the view, the name of the inputs are "hand_installs[APPLICATION_NAME]"

In the controller Hand_InstallsController, actionCreate() method, it is looking for $_POST['Hand_Installs'] and is not finding it.

Therefore, the create / update are failing.
* As a workaround, If I change to $_POST['hand_installs'] and things work. (All lower case)

Thanks,
Edward

0

#2 User is offline   qiang 

  • Yii Project Lead
  • Yii
  • Group: Yii Dev Team
  • Posts: 5,891
  • Joined: 04-October 08
  • Location:DC, USA

Posted 26 November 2008 - 02:45 PM

Could you check your model class name and see if it has proper case?
0

#3 User is offline   meanpenguin 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 20
  • Joined: 08-November 08

Posted 26 November 2008 - 02:51 PM

That was the problem. 
Model was "class hand_installs"

Recreating the model with "model Hand_Installs" fixed it.

Thanks,
Edward
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users