Doctrine 1
  1. Doctrine 1
  2. DC-450

ORACLE: The generate DQL with i18n behavior doesn't correct

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 1.2.1
    • Fix Version/s: None
    • Component/s: I18n
    • Labels:
      None

      Description

      My schema:

      ---
      Country:
        tableName:          country
        actAs:
          SoftDelete:       ~
          Timestampable:    ~
          I18n:
            fields:         [name]
            className:      %CLASS%I18n
            tableName:      %TABLE%_i18n
            length:         5
        columns:
          id:
            type:           integer(3)
            primary:        true
            unsigned:       true
            sequence:       country
          created_at:
            type:           timestamp
          updated_at:
            type:           timestamp
          enabled_at:
            type:           timestamp
            notnull:        true
          disabled_at:
            type:           timestamp
          iso_code:
            type:           string(2)
          marc_code:
            type:           string(3)
          name:
            type:           string(255)
            notnull:        true
      

      DQL query:

       
      $country = Doctrine::getTable('Country')->findOneByMarcCode('sz');
      

      Error:

       
      ORA-00904: "C"."NAME": invalid identifier : SELECT a.* FROM ( SELECT c.id AS c__id, c.created_at AS c__created_at, c.updated_at AS c__updated_at, c.enabled_at AS 
      c__enabled_at, c.disabled_at AS c__disabled_at, c.iso_code AS c__iso_code, c.marc_code AS c__marc_code, c.name AS c__name, c.deleted_at AS c__deleted_at FROM
      common.country c WHERE (c.marc_code = :oci_b_var_1) ) a WHERE ROWNUM <= 1 
      

      In this line, i show the field "name", but this field is in table translation. The DQL above is very complicated for only simple request. Why ?

      Thank's

      Bertrand

        Activity

        Hide
        Bertrand Zuchuat added a comment -

        I don't have a real connection on Oracle Server. This test doesn't return the error above.

        Please test on real connection.

        Thanks

        Show
        Bertrand Zuchuat added a comment - I don't have a real connection on Oracle Server. This test doesn't return the error above. Please test on real connection. Thanks

          People

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

            Dates

            • Created:
              Updated: