Welcome Guest, Not a member yet? Register   Sign In
Problem relationship
#1

[eluser]yoelrodguez[/eluser]
Hello I am establishing a relationship of one-to-many and gives me the following error

Error Number: 1146

Table 'altsce.anno_escolar_cursos' doesn't exist

model

Curso

Code:
public $has_one = array(
      'curso_anio' => array(
         'class'=>'anio',
        'other_field' => 'anio',
        'join_other_as' => 'anno_escolar',
        'join_self_as' => 'cursos',
        ),

Anio

Code:
public $has_many = array(
        'anio' => array(
        'class'=>'curso',
        'other_field' => 'curso_anio',
        'join_other_as' => 'cursos',
        'join_self_as' => 'anno_escolar',
        ),





Theme © iAndrew 2016 - Forum software by © MyBB