Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-15497

[reverse_]related_objects produces sql error on attribute sorting

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Obsolete
    • Icon: Medium Medium
    • Future
    • 4.0.6, 4.1.3, 4.2.0beta1
    • Database related
    • None

    Description

      As explained here:
      http://ez.no/developer/forum/setup_design/fetching_list_of_nodes_with_array_of_node_ids

      So this is sort of an enhancement as well to get complete list/tree fetch sort_by support in [reverse_]related_objects fetches.

      Possible patch:

      Index: kernel/classes/ezcontentobject.php
      ===================================================================
      --- kernel/classes/ezcontentobject.php	(revision 24107)
      +++ kernel/classes/ezcontentobject.php	(working copy)
      @@ -2858,8 +2858,9 @@
       
               $db = eZDB::instance();
               $sortingString = '';
      -        $sortingInfo = array( 'attributeFromSQL' => '',
      -                              'attributeWhereSQL' => '' );
      +        $sortingInfo = array( 'attributeTargetSQL' => '',
      +                              'attributeFromSQL'   => '',
      +                              'attributeWhereSQL'  => '' );
       
               $showInvisibleNodesCond = '';
               // process params (only SortBy and IgnoreVisibility currently supported):
      @@ -2925,6 +2926,7 @@
                               ezcontentclass.identifier as contentclass_identifier,
                               ezcontentclass.is_container as is_container,
                               ezcontentobject.* $versionNameTargets
      +                        $sortingInfo[attributeTargetSQL]
                            FROM
                               ezcontentclass,
                               ezcontentobject,
      

      Attachments

        Activity

          People

            unknown unknown
            andre1 andre1
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: