Doctrine 1
  1. Doctrine 1
  2. DC-652

unidirectionnal hasMany definition

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 1.2.2
    • Fix Version/s: None
    • Component/s: Relations
    • Labels:
      None

      Description

      Here the definition of the Domain Model : http://pastebin.com/i80d73s8

      To resume, Show is a mother class. Video, is a direct extend from Show.
      ShowContainer is an abstract class that expend Show. It define an hasMany relation to Video, through CompoShowShow.
      Program and Playlist are extends ShowContainer.

      the following DQL Query work fine.

      $query = Doctrine_Query::create ()
      ->from ("Model_Program program")
      ->leftJoin ("program.children children");
      $oShow = $query->fetchOne ();
      var_dump (get_class ($oShow->children[0])); //Output Model_Video

      But, the following code isn't working :

      $oProgram = Doctrine_Core::getTable ("Model_Program")->find (2);
      $oProgram->children;

      //Throw Exception
      //Message: Unknown record property / related component "children" on "Model_Program"
      //Doctrine\Record.php(1381)

      The Program#2 is in the database.

      Here we are.

        Activity

        Hide
        Jonathan H. Wage added a comment -

        We'll need some more information. I don't see the Model_Program model anywhere. Can you create a failing test case?

        Show
        Jonathan H. Wage added a comment - We'll need some more information. I don't see the Model_Program model anywhere. Can you create a failing test case?

          People

          • Assignee:
            Jonathan H. Wage
            Reporter:
            Thomas Tourlourat - Armetiz
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: