php - baking with PHPcake correct database naming -


Just enter MVC developement and cake information, so I'm getting confused with table naming and ID references.

I have a table and an asset called discrimination property in the asset_status_id field that is meant for the reference of the table. Asset_Statuses This table is a simple list of possible situations that the property is at any time (active, inactive) I have chosen to use the table for this list. I think I have to add more options in some time. In this table, I have a The 'sequence' field is so that I will take the apiar in any drop down in order.

A table called Asset -Status is being seen as a sign, which is that a relation between assets is present for the ship and a temporary status table. Now I know that your thinking just says table idols right? But I have to use the 'status' tables which I want to use as a domain_status that will not use the same status lists of the curriculum.

So what should I do to make naming conventions all this to work smoothly?

You can be better by using only one status table, because it can be used completely And not just for the property. It can be easily done by adding a model field, so its ID, model, status.

  class property AppModel extended {var $ belongsTo = array ('condition' => array ('className' => 'condition' // is appropriate There is no need for circulation with and no plugins in the 'terms' => array ('status.model' = & gt; 'asset'))); }  

You can use a behavior to automate the setting of the model field in the first Save.

As a side note, all tables should have all lower case, not funny if you are using

The reason for these things May be the way they should

Comments