Doctrine 1
  1. Doctrine 1
  2. DC-704

Where fields not escaped properly when deleting associations.

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 1.2.2
    • Fix Version/s: None
    • Component/s: Record
    • Labels:
      None
    • Environment:
      Debian 5, PHP 5.3, Symfony 1.4.4, sfDoctrinePlugin, Pgsql driver

      Description

      We noticed that in both Doctrine/Record.php and Doctrine/Connection/UnitOfWork.php the fields in the where clause arent being escaped properly. A few of our fields happen to be keywords, but it seems that these queries arent escaping the names of fields that happen to be keywords.

      I have verified the field name is in the keywords list for my driver.

      This happens near the following code:
      Doctrine/Record.php:2465
      Doctrine/Record.php:2476
      Doctrine/Connection/UnitOfWork.php: 443

      1. diff.patch
        3 kB
        Glenn R. Martin

        Activity

        Hide
        Jonathan H. Wage added a comment -

        Can you provide a patch with the changes?

        Show
        Jonathan H. Wage added a comment - Can you provide a patch with the changes?
        Hide
        Glenn R. Martin added a comment -

        The following is the patch you requested. This is what WE did for our specific case to fix this... though it wont work with any other driver... What we really should have done (if I had been given time) was to pull the escape characters from the database driver so this would work on every database, not just Postgres.

        Show
        Glenn R. Martin added a comment - The following is the patch you requested. This is what WE did for our specific case to fix this... though it wont work with any other driver... What we really should have done (if I had been given time) was to pull the escape characters from the database driver so this would work on every database, not just Postgres.

          People

          • Assignee:
            Jonathan H. Wage
            Reporter:
            Glenn R. Martin
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated: