[TYPO3-mvc] extbase SetOrderings doesn't work

Johannes C. Schulz - EnzephaloN IT-Solutions info at enzephalon.de
Mon Jan 24 16:29:17 CET 2011


Hi

The SQL-Statement for example is:
SELECT tx_psoabilling_domain_model_band.* FROM
tx_psoabilling_domain_model_band WHERE tx_psoabilling_domain_model_band.year
= '1' AND tx_psoabilling_domain_model_band.deleted=0 AND
tx_psoabilling_domain_model_band.t3ver_state<=0 AND
tx_psoabilling_domain_model_band.hidden=0 AND
tx_psoabilling_domain_model_band.starttime<=1295881260 AND
(tx_psoabilling_domain_model_band.endtime=0 OR
tx_psoabilling_domain_model_band.endtime>1295881260) AND
tx_psoabilling_domain_model_band.sys_language_uid IN (0,-1) AND
tx_psoabilling_domain_model_band.pid IN (67) ORDER BY
tx_psoabilling_domain_model_band.dateadded DESC

I don't know how to write-down/copy the array of domain objects for you.
Bute here is the beginning of my fluid-Template:

<f:layout name="default" />
<f:section name="main">
<f:flashMessages />
      <f:for each="{bands}" as="band">
           <div class="psoabilling_list">
             <div class="psoabilling_listitem">
	  <div class="psoabilling_bandlogo">
                   <f:if condition="{band.logo}!=">
                     <f:then>
Ans so on. Maybe the "for each" isn't the right way?

Best regards
Johannes

-----Ursprüngliche Nachricht-----
Von: typo3-project-typo3v4mvc-bounces at lists.typo3.org
[mailto:typo3-project-typo3v4mvc-bounces at lists.typo3.org] Im Auftrag von
Michael Knoll
Gesendet: Montag, 24. Januar 2011 16:15
An: typo3-project-typo3v4mvc at lists.typo3.org
Betreff: Re: [TYPO3-mvc] extbase SetOrderings doesn't work

Hi Johannes,

for me this works as you described it - except the part that for me it 
also outputs the right sorting :)

If the SQL query is correct then there should be another error - hm?

Can you output the result of the query and the array of domain objects 
you get back? They won't be sorted after the database query is executed. 
So if the query is correct, the order of the objects should be correct.

Greetings

Mimi




More information about the TYPO3-project-typo3v4mvc mailing list