Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0-ALPHA4
    • Fix Version/s: 2.0-BETA1
    • Component/s: DQL
    • Security Level: All
    • Labels:
      None

      Description

              $dql = 'SELECT p FROM Whitewashing\Blog\Post p WHERE ?1 MEMBER OF p.tags';
      
              return $this->_em->createQuery($dql)
                               ->setParameter(1, $tagId)
                               ->setMaxResults(10)
                               ->getResult();
      
      SELECT b0_.post_headline AS post_headline0, b0_.post_text AS post_text1, b0_.post_created AS post_created2, b0_.is_published AS is_published3, b0_.id AS id4, b0_.author_id AS author_id5, b0_.blog_id AS blog_id6 FROM blog_posts b0_ WHERE EXISTS (SELECT 1 FROM blog_posts_tags b1_ INNER JOIN blog_tags b2_ ON b1_.post_id = b0_.id WHERE b1_.tag_id = b2_.id AND b2_.id = 1);
      

      Generates the following error: ERROR 1054 (42S22): Unknown column 'b0_.id' in 'on clause'

        Activity

        Hide
        Jorrit Posthuma added a comment -

        Now i remember why we do have the @JoinTable on the inverse side. We want to specify a @JoinTable( name="User_UserGroups" ). It doen't work only specified on the owning side, and we figured out that this was the only way?

        Show
        Jorrit Posthuma added a comment - Now i remember why we do have the @JoinTable on the inverse side. We want to specify a @JoinTable( name="User_UserGroups" ). It doen't work only specified on the owning side, and we figured out that this was the only way?
        Hide
        Jorrit Posthuma added a comment -

        Never mind. Need to get some sleep. Sorry for the inconvenience. Only wanted to help. Love the Doctrine 2 project!!!

        Show
        Jorrit Posthuma added a comment - Never mind. Need to get some sleep. Sorry for the inconvenience. Only wanted to help. Love the Doctrine 2 project!!!
        Hide
        Jorrit Posthuma added a comment -

        Sorry, last question, shouldn't the SqlWalker in that case call getQuotedJoinTableName on the owningAssoc, instead of assoc? ( Line 1404 rev. 0c07b311360070a2268c0f900c96f5aed643f5ca )

        Show
        Jorrit Posthuma added a comment - Sorry, last question, shouldn't the SqlWalker in that case call getQuotedJoinTableName on the owningAssoc, instead of assoc? ( Line 1404 rev. 0c07b311360070a2268c0f900c96f5aed643f5ca )
        Hide
        Jorrit Posthuma added a comment -

        Should i create a new Issue for that?

        Show
        Jorrit Posthuma added a comment - Should i create a new Issue for that?
        Hide
        Benjamin Eberlei added a comment -

        yes please!

        Show
        Benjamin Eberlei added a comment - yes please!

          People

          • Assignee:
            Roman S. Borschel
            Reporter:
            Benjamin Eberlei
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: