Doctrine 1
  1. Doctrine 1
  2. DC-534

Couldn't hydrate. Found non-unique key mapping named 'lang'

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Critical Critical
    • Resolution: Incomplete
    • Affects Version/s: 1.2.1
    • Fix Version/s: None
    • Component/s: I18n
    • Labels:
      None
    • Environment:
      PHP 5.2.9 Symfony 1.4

      Description

      For the following query

      return $this->createQuery('a')
      ->innerJoin('a.Translation t WITH t.lang = ?', $lang)
      ->innerJoin('a.UserAttributes ua')
      ->innerJoin('ua.AttrOptions o WITH o.attribute_id = a.id')
      ->innerJoin('o.Translation ot WITH ot.lang = ?', $lang)
      ->addWhere('ua.user_id = ?', $userId)
      ->addWhere('a.tab = ?', $tab)
      ->addOrderBy('a.ord asc')
      ->execute();

      Unknown macro: {/quote}

      i get

      Couldn't hydrate. Found non-unique key mapping named 'lang'.

      {/quote}

      error, so i cannot join more than one translation table in one query because it cause error.

        Activity

        Hide
        Jonathan H. Wage added a comment -

        Can you create a test case for this? You can find information about Doctrine unit testing here: http://www.doctrine-project.org/documentation/manual/1_2/en/unit-testing

        Show
        Jonathan H. Wage added a comment - Can you create a test case for this? You can find information about Doctrine unit testing here: http://www.doctrine-project.org/documentation/manual/1_2/en/unit-testing
        Hide
        Mikhail Menshinskiy added a comment -

        I have the same error.
        How to solve this issue?

        Show
        Mikhail Menshinskiy added a comment - I have the same error. How to solve this issue?

          People

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

            Dates

            • Created:
              Updated:
              Resolved: