Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-57

ManyToMany PDOException MySQL Syntax Error

    Details

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

      Description

      For ManyToMany Relation I have an MySQL Sytax Error from the StandardEntityPersister.php

      Hier is my error code:

      2009-10-22T09:39:31+02:00 ERR (3): exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '= lemma_type.type_id WHERE lemma_type.lemma_id = NULL' at line 1' in /usr/local/zend/apache2/htdocs/doctrine/lib/Doctrine/ORM/Persisters/StandardEntityPersister.php:475
      Stack trace:
      #0 /usr/local/zend/apache2/htdocs/doctrine/lib/Doctrine/ORM/Persisters/StandardEntityPersister.php(475): PDOStatement->execute(Array)
      #1 /usr/local/zend/apache2/htdocs/doctrine/lib/Doctrine/ORM/Mapping/ManyToManyMapping.php(186): Doctrine\ORM\Persisters\StandardEntityPersister->loadManyToManyCollection(Object(Doctrine\ORM\Mapping\ManyToManyMapping), Array, Object(Doctrine\ORM\PersistentCollection))
      #2 /usr/local/zend/apache2/htdocs/doctrine/lib/Doctrine/ORM/PersistentCollection.php(233): Doctrine\ORM\Mapping\ManyToManyMapping->load(Object(kateglo\application\models\Lemma), Object(Doctrine\ORM\PersistentCollection), Object(Doctrine\ORM\EntityManager))
      #3 /usr/local/zend/apache2/htdocs/doctrine/lib/Doctrine/ORM/PersistentCollection.php(495): Doctrine\ORM\PersistentCollection->_initialize()
      #4 /usr/local/zend/apache2/htdocs/kateglo/application/views/scripts/search/index.phtml(24): Doctrine\ORM\PersistentCollection->getIterator()

      @roman: i send you the new database structure and the php code (models etc..)

      1. doctrine20.patch
        3 kB
        Arthur Purnama
      2. doctrine20Test.diff
        6 kB
        Arthur Purnama
      3. kateglo.tar.gz
        11 kB
        Arthur Purnama
      4. kateglox.sql
        13 kB
        Arthur Purnama

        Activity

        Hide
        Roman S. Borschel added a comment -

        I'm working on it and will get back to you shortly.

        Thanks for your patience.

        Show
        Roman S. Borschel added a comment - I'm working on it and will get back to you shortly. Thanks for your patience.
        Hide
        Roman S. Borschel added a comment -

        Please try the latest code from trunk now and report back. Thanks!

        Show
        Roman S. Borschel added a comment - Please try the latest code from trunk now and report back. Thanks!
        Hide
        Arthur Purnama added a comment -

        Hello,

        Hier i send you a patch file for testing the ManyToMany problem. i hope this help.
        I see that you already working on that.

        Thank you very much.

        Show
        Arthur Purnama added a comment - Hello, Hier i send you a patch file for testing the ManyToMany problem. i hope this help. I see that you already working on that. Thank you very much.
        Hide
        Arthur Purnama added a comment -

        Ok it works,

        Thank You.

        Show
        Arthur Purnama added a comment - Ok it works, Thank You.
        Hide
        Roman S. Borschel added a comment -

        I added your new test to our suite! Thank you!

        Show
        Roman S. Borschel added a comment - I added your new test to our suite! Thank you!

          People

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

            Dates

            • Created:
              Updated:
              Resolved: