The "Types" model has no "Situation" relation

1

Oops, I'm trying to make a relationship between two tables but I'm getting that error back, above. I have no idea what's wrong.

this is my YAML structure:

Tipos_denuncias:
 connection: doctrine
 tableName: tipos_denuncias
 columns:
 situacao:
  type: integer(8)
  readonly: false
  notnull: false
  comment: Situacao
  extra: { label: Situacao, tooltip: Informe a situação da denúncia. } 
 relations:
   Situacao:
   Class: Situacoes
   foreignAlias: Situacao
   local: situacao
   foreign: id
   type: one
   foreignType: many

   Situacoes:
    connection: doctrine
    tableName: situacoes
    columns:
           id:
            type: integer(8)
            primary: true
            readonly: true
            autoincrement: true
           descricao:
            type: varchar(10)
            readonly: false
            notnull: true
            comment: Descrição
            extra: { label: Descrição, tooltip: Descrição da Situação. }

and this is my symfony structure:

public function configure()
{
  $this->widgetSchema['situacao'] = new sfWidgetFormDoctrineChoice( array('label' => 'Situacao', 'method' => 'getSituacao', 'extra' => array("label" => "Situacao", "tooltip" => "Informe a situação da denúncia."), 'model' => $this->getRelatedModelName('Situacao'), 'order_by' => array("descricao", "asc"), 'add_empty' => ''));
 }

You're making a mistake in Alias, but I think it's right. Can anyone see any errors?

    
asked by anonymous 28.04.2015 / 19:17

0 answers