Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-49

Incomplete MySQL Query Generator (MySQL Syntax error)

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.0-ALPHA3
    • Fix Version/s: 2.0-ALPHA3
    • Component/s: None
    • Security Level: All
    • Labels:
      None
    • Environment:

      Description

      i checkout the HEAD version. and try to write this DQL

      $query = utilities\DataAccess::getEntityManager()->createQuery("SELECT
      p, t FROM ".models\Phrase::CLASS_NAME." p join p.type t WHERE p.phrase
      = '$phrase'");

      i commented out the $config->setAllowPartialObjects(false);

      and have PDO error that my MySQL statement sytax is invalid.

      i check the Query that the Doctrine create and its like this :
      SELECT p0_.phrase_id AS phrase_id0, p0_.phrase_name AS phrase_name1,
      p1_.phrase_type_id AS phrase_type_id2, p1_.phrase_type_name AS
      phrase_type_name3, p1_.phrase_type_abbreviation AS
      phrase_type_abbreviation4 FROM phrase p0_ INNER JOIN phrase_type p1_
      ON p0_.phrase_type_id = p1_. WHERE p0_.phrase_name = 'abu'

      as you can si at the ON statement it writes p0_.phrase_type_id = p1_.

      the p1_. is not completed. i think my DocAnnotation is OK, because i
      look at the Doctrine Tests Models that test the OneToMany Function
      (the one with the ECommerce models, product and features). I have
      followed all the doc annotation writes there.

        Activity

        Arthur Purnama created issue -
        Roman S. Borschel made changes -
        Field Original Value New Value
        Status Open [ 1 ] In Progress [ 3 ]
        Roman S. Borschel made changes -
        Status In Progress [ 3 ] Closed [ 6 ]
        Fix Version/s 2.0-ALPHA3 [ 10029 ]
        Resolution Fixed [ 1 ]
        Benjamin Eberlei made changes -
        Workflow jira [ 10192 ] jira-feedback [ 15437 ]
        Benjamin Eberlei made changes -
        Workflow jira-feedback [ 15437 ] jira-feedback2 [ 17301 ]
        Benjamin Eberlei made changes -
        Workflow jira-feedback2 [ 17301 ] jira-feedback3 [ 19558 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved: