投稿のモデルを再生成する


>cd "c:\Program Files\xampp\htdocs"

~中略~

Please select a class to Bake:(M/V/C)
>M

~中略~

Enter a number from the list above, or type in the name of anither model.
>3 ←投稿を生成

~中略~

Post [[belongsTo]] Category?(y/n)
[y]>y ←カテゴリへ参照があるので「y」を指定。

Post [[hasOne]] Comment?(y/n)
[y]>n ←コメント投稿は1つではないので「n」を指定。

Post [[hasMany]] Comment?(y/n)
[y]>y ←コメントは複数なので「y」を指定。

Would you like to define some additional model associations?(y/n)
[y]>n ←これ以上の関連はないので「n」を指定。

-----------------------------------------------------------------
The following model will be created:
-----------------------------------------------------------------
Model Name:       Post
DB Connection:    default
Model Table:      posts
Validation:       Array
(
    [category_id] => VALID NOT EMPTY
    [title] => VALID NOT EMPTY
    [body] => VALID NOT EMPTY
)
Associations:
          Post belongsTo Category
          Post hasMany   Comment
-----------------------------------------------------------------

Look okay?(y/n)
[y]>y ←内容が良ければ「y」を指定。

Creating file C:\Program Files\xampp\htdocs\blog\models\post.php
File exists, overwrite? C:\Program Files\xampp\htdocs\blog\models\post.php(y/n/q):y ←上書きするので「y」を指定。
WriteC:\Program Files\xampp1.5.5\htdocs\cakephp\blog\models\post.php

~以下略~
最終更新:2007年05月15日 19:06