Yii Keeps Adding 's' To Table Names From Mssql

Hello!

I’m new here, and I hope I’m posting in the correct section.

As the title says, Yii->Gii is adding the letter ‘s’ to every MSSQL table name. I’m using GII to generate CRUDs and Models. I found another post on the same topic, but on another framework’s forum <_< (ruby on rails). Here is the link to the post: www.ruby-forum.com/topic/68292 . Someone there mentioned something about pluralized table names, and someone else came up with a solution to disable this feature in the framework with this property: ActiveRecord::Base.pluralize_table_names = false .

I looked up in CActiveRecord class reference for a similar property, but couldn’t find it, so I’m stuck.

Any help would be appreciated!

I think I may have found something, but I’m not sure of it.

The below code is part of several php files in default template directory of GII.

Should I make a new template and remove the pluralize part? :unsure:




<?php

$nameColumn=$this->guessNameColumn($this->tableSchema->columns);

$label=$this->pluralize($this->class2name($this->modelClass));

echo "\$this->breadcrumbs=array(

	'$label'=>array('index'),

	\$model->{$nameColumn},

);\n";

?>