Doctrine 1
  1. Doctrine 1
  2. DC-356

Error in self referencing (nest relations) and tableName.

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 1.2.1
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:
      Linux, php 5.2.10, apache 2.2.12

      Description

      I have this schema:

      1. Interface
        Interfaz:
        tableName: YT_INTERFAZ
        columns:
        cinterfaz: { type: integer, notnull: true, primary: true, autoincrement: true }

        relations:
        Conexiones:
        class: Interfaz
        local: cinterfazsrc
        foreign: cinterfazdst
        refClass: Conexion
        equal: true

      #Link
      Conexion:
      tableName: YT_CONEXION
      columns:
      cinterfazsrc:

      { type: integer, primary: true }

      cinterfazdst:

      { type: integer, primary: true }

      When I try to get $interfaz->Conexiones, I get this message:

      Notice: Undefined index: yt_interfaz in /home/sergio/Proyectos/syc/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Hydrator/Graph.php on line 288

      Notice: Undefined index: in /home/sergio/Proyectos/syc/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Hydrator/Graph.php on line 289

      Fatal error: Call to a member function getFieldName() on a non-object in /home/sergio/Proyectos/syc/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Hydrator/Graph.php on line 290

      But If I remove tableName fields in schema declaration, it works perfectly. The name of tableName don't matters, if you use it, it fails.

        Activity

          People

          • Assignee:
            Jonathan H. Wage
            Reporter:
            Sergio Gomez
          • Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated: