[TYPO3-mvc] Extbase query with AND over 1:n related objects

g4-lisz at tonarchiv.ch g4-lisz at tonarchiv.ch
Fri Mar 30 15:58:55 CEST 2012


On 30.03.2012 02:12, Jochen Rau wrote:
> Hi,
>> Ok i uncommented the debug line... where does the log go? Do i have
>> to enable logging in the config tool?
> Yes. But you can also replace the debug with var_dump. Anyway, you
> should not do this in a production environment as the internal database
> structure might become visible to the FE user. The output of debug can
> (and should) be constrained to be visible only for your IP.
>
> -Jochen
> _______________________________________________
> TYPO3-project-typo3v4mvc mailing list
> TYPO3-project-typo3v4mvc at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc
Sorry, i caught the wrong output...

This is it:
SELECT tx_hplusinfo_domain_model_klinik . *
FROM tx_hplusinfo_domain_model_klinik
WHERE (
     (
         tx_hplusinfo_domain_model_klinik.is_online = '1'
         AND tx_hplusinfo_domain_model_klinik.uid
         IN (

             SELECT uid_local
             FROM tx_hplusinfo_klinik_kategorie_mm
             WHERE uid_foreign =1
         )
     )
     AND tx_hplusinfo_domain_model_klinik.uid
         IN (

             SELECT uid_local
             FROM tx_hplusinfo_klinik_kategorie_mm
             WHERE uid_foreign =3
         )
     )
AND tx_hplusinfo_domain_model_klinik.deleted =0
AND tx_hplusinfo_domain_model_klinik.pid
IN ( 24, 23, 29 )
LIMIT 0 , 30

Looks ok but for some reason the result is still wrong. There are 
kliniks without kategorie=1 and karegorie=3...
I will compare this with the result directly from the DB.

Cheers,
Till




More information about the TYPO3-project-typo3v4mvc mailing list