I made a controller for a WebService and everything works fine. I can export an array of models without problems.
Now I want to add a field to the exported model, and this does NOT work! I cannot understand why! In my local test server the field is exported, but it’s not on the production one!!!
The field is visible in the webservice’s XML, but then it’s missing in the returned data!
I tried clearing the assets, no way. I cannot understand why the field is visible in the XML and not in the returned data!!!
The method is this:
/**
* @param int Id di partenza
* @return Prepagata[] Elenco di prepagate
* @soap
*/
public function esportaPrepagate($id_start)
{
$cdb = new CDbCriteria;
$cdb->compare ('id','>'.$id_start);
$cdb->limit = 100;
return Prepagata::model()->findAll($cdb);
}
this is a snippet of the model
/**
* @var integer
* @soap
*/
public $id;
/**
* @var string
* @soap
*/
public $codice;
/**
* @var string
* @soap
*/
public $password;
id and codice are exported, password is not.