[TYPO3-mvc] FROM LEFT JOIN (table name missing in between FROM and LEFT JOIN)
Mark Kuiphuis
spam at markyourweb.com
Tue Feb 21 09:07:57 CET 2012
G'day all,
I'm getting a TYPO3 exception with the folllowing SQL statement.
SELECT tx_extension_domain_model_filteroptions.* FROM LEFT JOIN
tx_extension_domain_model_filteroptions ON
tx_extension_project_product_filteroptions_mm.uid_foreign =
tx_extension_domain_model_filteroptions.uid,
tx_extension_project_product_filteroptions_mm WHERE
(tx_extension_project_product_filteroptions_mm.uid_local = '1' AND
tx_extension_project_product_filteroptions_mm.ident =
'tx_extension_project_product_filteroptions_mm') AND
tx_extension_domain_model_filteroptions.deleted=0 AND
tx_extension_domain_model_filteroptions.t3ver_state<=0 AND
tx_extension_domain_model_filteroptions.pid!=-1 AND
tx_extension_domain_model_filteroptions.hidden=0 AND
tx_extension_domain_model_filteroptions.starttime<=1329811380 AND
(tx_extension_domain_model_filteroptions.endtime=0 OR
tx_extension_domain_model_filteroptions.endtime>1329811380) ORDER BY
tx_extension_project_product_filteroptions_mm.sorting ASC
The weird thing is that there is no table name in between the FROM and LEFT JOIN in
the SQL statement, but just before the WHERE clause is a table name.
So manually moving this table name in between the FROM and LEFT JOIN, does give me
some results.
The SQL statement then looks like this:
SELECT tx_extension_domain_model_filteroptions.* FROM
tx_extension_project_product_filteroptions_mm LEFT JOIN
tx_extension_domain_model_filteroptions ON
tx_extension_project_product_filteroptions_mm.uid_foreign =
tx_extension_domain_model_filteroptions.uid WHERE
(tx_extension_project_product_filteroptions_mm.uid_local = '1' AND
tx_extension_project_product_filteroptions_mm.ident =
'tx_extension_project_product_filteroptions_mm') AND
tx_extension_domain_model_filteroptions.deleted=0 AND
tx_extension_domain_model_filteroptions.t3ver_state<=0 AND
tx_extension_domain_model_filteroptions.pid!=-1 AND
tx_extension_domain_model_filteroptions.hidden=0 AND
tx_extension_domain_model_filteroptions.starttime<=1329811380 AND
(tx_extension_domain_model_filteroptions.endtime=0 OR
tx_extension_domain_model_filteroptions.endtime>1329811380) ORDER BY
tx_extension_project_product_filteroptions_mm.sorting ASC
Is it something which is not setup correctly in the TCA or I have forgotten to
include in the TCA or is Extbase unable to generate the right SQL for this condition?
Thanks,
Mark
More information about the TYPO3-project-typo3v4mvc
mailing list