[TYPO3-mvc] MM relation / foreign_table_where gets ignored

Ingo Franzen calculon at arcor.de
Thu Mar 24 00:10:24 CET 2011


Hello list,

I already posted my problem here:
http://lists.typo3.org/pipermail/typo3-project-typo3v4mvc/2011-March/008987.html

Maybe its too hidden there for someone to find, so ill open a new thread 
and just repeat it, so dont beat me ;)


Hello list,

i am still fiddling with the problem to sort the content of an object
storage via TCA (foreign_table_where) before its rendered in the view.

My Configuration for the MM-relation is still the same (see down).
Strangely, my

'foreign_table_where' => 'ORDER BY tx_reltest2_domain_model_fridge.name ASC'

is totally ignored. The query that is generated looks like this:

SELECT tx_reltest2_domain_model_fridge.* FROM tx_reltest2_fridge_food_mm
LEFT JOIN tx_reltest2_domain_model_fridge ON
tx_reltest2_fridge_food_mm.uid_local =
tx_reltest2_domain_model_fridge.uid WHERE
tx_reltest2_fridge_food_mm.uid_foreign = '5' ORDER BY
tx_reltest2_fridge_food_mm.sorting_foreign ASC

As one can see the ORDER BY isnt touched by the foreign_table_where setting.

What am I missing here? Is there additional TS necessary? Or is there a
possibility that foreign_table_where is overriden somewhere??

Thanks and have a nice day!

Ingo

  > 'fridges' => array(
  > 'exclude' => 0,
  > 'label' =>
  >
'LLL:EXT:reltest2/Resources/Private/Language/locallang_db.xml:tx_reltest2_domain_model_food.fridges', 


  >
  > 'config' => array(
  > 'type' => 'select',
  > 'foreign_table_where' => 'ORDER BY
tx_reltest2_domain_model_fridge.name ASC',
  > 'foreign class' => 'Tx_Reltest2_Domain_Model_Fridge',
  > 'foreign_table' => 'tx_reltest2_domain_model_fridge',
  > 'MM' => 'tx_reltest2_fridge_food_mm',
  > 'MM_opposite_field' => 'foods',
  > 'size' => 10,
  > 'autoSizeMax' => 30,
  > 'maxitems' => 9999,
  >
  >


More information about the TYPO3-project-typo3v4mvc mailing list