Uploaded image for project: 'Doctrine 2 - ORM'
  1. Doctrine 2 - ORM
  2. DDC-1986

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


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


      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?



          • Assignee:
            beberlei Benjamin Eberlei
            benja-m-1 Benjamin Grandfond
          • Votes:
            1 Vote for this issue
            4 Start watching this issue


            • Created: