Doctrine 1
  1. Doctrine 1
  2. DC-628

Two queries on the same table seems to share set of fields

    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
    • Environment:
      OS: Vista 64
      Zend Framework 1.10.1
      MySQL: 5.1.39

      Description

      Two queries:

      1. $ab1 = Doctrine_Query::create()
      ->from('Model_UserAddressbook ab')
      ->leftJoin('ab.UserPersons up')
      ->leftJoin('ab.AdminUsers au'); // second one doesn't have this join

      2. $ab2 = Doctrine_Query::create()
      ->from('Model_UserAddressbook ab')
      ->leftJoin('ab.UserPersons up');

      When executing the following fetchOne:

      A.) $x1 = $ab2->fetchOne()->toArray(); // has fields from addressbook, and subarray UserPersons, OK
      B.) $x2 = $ab1->fetchOne()->toArray(); // has fields from addressbook, and subarray UserPersons and AdminUsers, OK
      C.) $x3 = $ab2->fetchOne()->toArray(); // has fields from addressbook, and subarray UserPersons and AdminUsers, NOT OK

      $x1 and $x3 should have the same set of fields, but $x3 has somehow received set of fields from $x2.

      I haven't turned on any caching, but even if the caching is on, the result sets shouldn't mix, right?

      I'm talking just about field names (set of fields), not fields data.

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Jonathan H. Wage
            Reporter:
            Vlatko Basic
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated: