[TYPO3-mvc] SQL-Query without tablename?!?!

Stefan Frömken firma at sfroemken.de
Wed Aug 31 17:10:39 CEST 2011


I'will stop it here. In my opinion this is no valid mm-relation to 
tx_dam. In TCA I see userFunc, softref, form_type = user and so on. I 
think this is a little bit to hard to understand.

Further I have temporarily modify Query.php on row 209:

//if ($this->source === NULL) {
	$this->source = $this->qomFactory->selector($this->getType(), 
$this->dataMapper->convertClassNameToTableName($this->getType()));
//}

Now the query looks like this:

SELECT tx_dam.* FROM tx_dam WHERE (tx_dam.uid_foreign = '27761' AND 
tx_dam.ident = 'tx_damnews_dam_images') AND tx_dam.deleted=0 AND 
tx_dam.t3ver_state<=0 AND tx_dam.pid!=-1 AND tx_dam.hidden=0 AND 
tx_dam.starttime<=1314802680 AND (tx_dam.endtime=0 OR 
tx_dam.endtime>1314802680) AND (tx_dam.fe_group='' OR tx_dam.fe_group IS 
NULL OR tx_dam.fe_group='0' OR FIND_IN_SET('0',tx_dam.fe_group) OR 
FIND_IN_SET('-1',tx_dam.fe_group)) AND tx_dam.sys_language_uid IN (0,-1) 
ORDER BY tx_dam.sorting_foreign ASC

Much better on the first view, but things like "tx_dam.uid_foreign" are 
still wrong!

Stefan


Am 31.08.2011 16:02, schrieb Stefan Frömken:
> Hello
>
> I got following SQL-Query:
>
> SELECT .* FROM tx_dam_mm_ref LEFT JOIN ON tx_dam_mm_ref.uid_local = .uid
> WHERE (tx_dam_mm_ref.uid_foreign = '27761' AND tx_dam_mm_ref.ident =
> 'tx_damnews_dam_images') ORDER BY tx_dam_mm_ref.sorting_foreign ASC
>
> I have a repository for Dam
> I have the injectFunction in my controller
> I have made a Dam-model with the fields I need
> I have mapped my DamModelname to tx_dam
>
> As you can see I don't need a repository nor a model for MM-Table.
> Extbase has found it on its own.
>
> Any idea what I have forgotten?
>
> Stefan



More information about the TYPO3-project-typo3v4mvc mailing list