Task #50884

$query->setOrderings not working for foreign table

Added by Jignesh Prajapati almost 9 years ago. Updated almost 9 years ago.

Status:
Rejected
Priority:
-- undefined --
Assignee:
-
Category:
-
Start date:
2013-08-07
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
6.2

Description

Hello,

I have a problem with ordering functionality on foreign table field.
I want to show the listing of Products in which there is one field categoryname from ProductCategory table.

I want to apply the ordering functionality on categoryname field in listing of products.

so how can i do with extbase extension?

I created the MM relationship between Products and ProductCategory table. categoryname field is displayed in listing but ordering is not working on it.

In Products repository i created the below function:

public function getData($args) {  

    $query = $this->createQuery();            

    $result =   $query->setOrderings(array('ProductCategory.categoryname' => \TYPO3\CMS\Extbase\Persistence\QueryInterface::ORDER_DESCENDING ))->execute();

       return $result;        
}

However it is not working for me. If i remove the setOrderings function then listing works fine otherwise it throws an error. It seems that setOrdering function not working with foreign table.

I tried many ways and find many solutions but no luck :(

I need to solve it very urgently. Any help will be greatly appreciated.

Thanks,
Jignesh

#1

Updated by Steffen Müller almost 9 years ago

  • Status changed from New to Rejected
  • Assignee deleted (Steffen Müller)
  • Priority changed from Must have to -- undefined --

You posted a request in the bugtracker of TYPO3 Logging project. I'm sorry, but this tracker is meant to only collect issues regarding the Logging API of TYPO3.

If you feel that support from other developers could solve your particular question, then please use the newsgroups, mailinglists or http://forum.typo3.org to ask for support.

If you believe the issue is a bug in the TYPO3 core, Please open another issue in the typo3v4-core project bugtracker

Since it's not possible to move your issue to this project, I will close this one.

Also available in: Atom PDF