Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-1986

findBy hydration with limit and offset with Oracle database (oci8 driver)

    Details

    • Type: Bug Bug
    • Status: Awaiting Feedback
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 2.3
    • Fix Version/s: None
    • Component/s: ORM
    • Security Level: All
    • Labels:
    • Environment:

      Description

      I tried to use the findBy method with limit and offset parameters against an Oracle database using oci8 driver.

      The query seems to executed successfully but the hydrator fails when hydrating data as there is a DOCTRINE_ROWNUM column appending the "limit" clause.

      Here is the exception thrown : "Notice: Undefined index: DOCTRINE_ROWNUM in [...]/vendor/doctrine/orm/lib/Doctrine/ORM/Internal/Hydration/SimpleObjectHydrator.php line 183"

      I was thinking about something like this to fix this issue :

      • add an attribute (platformExtraColumns) to the platform class, storing every column added by methods like doModifyLimitQuery
      • check in hydrator method hydrateRowData if the column exists among the extra columns attribute of the custom platform
      • don't use the column if true

      Maybe there is a better approach, what are your thoughts?

        Activity

        Benjamin Grandfond created issue -
        Dimitar Isusov made changes -
        Field Original Value New Value
        Status Open [ 1 ] Awaiting Feedback [ 10000 ]

          People

          • Assignee:
            Benjamin Eberlei
            Reporter:
            Benjamin Grandfond
          • Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated: