Database Naming Conventions?

Just wondering if it does… I read the page about naming conventions in the Definitive Guide (including the comments), and although there’s no mention of table-naming conventions, there would seem to be some form that Yii is expecting.

I say this because when I generated models with yiic, it created model relationships based on the table names.

Hi, yes Yii expects convention. Check this.

// Maybe a hint to the AR page should be put into the convention page of the guide to make things more clear.

A suggestion regarding DB relationships:

As a newbie (with Yii and PHP, not software development) I have gotten confused many times by the minimalistic syntax of the convention. For example, naming a relationship with the same name as the related model except for the case – e.g. tbl_state (class State) relates to tbl_country (class Country) by relationship (BELONGS_TO) ‘country’ – is confusing to me. I don’t know whether it’s a relationship or an attribute (field) of the table.

I would suggest that the convention be changed so that relations are named explicitly: in the example above, I call the relation ‘relToCountry’. By the same token, the reverse relation would be called ‘relFromState’. This way the code is more readable to the guy that will end up maintaining it.

Just saying…

Think link you provided i have seen before, when I was using Yii 1.something. Just to confirm, does that mean there are no changes to the naming conventions. They are as from before?