[TYPO3-mvc] Database query inner join

Michael Ruhdorfer michael.ruhdorfer.1line at gmail.com
Mon Aug 16 06:39:37 CEST 2010


thx - that worked ;)

i got an error with the ids - meaning that i had datasets of company where a not existing id of employee had been entered...

Lg michael

Am 12.08.2010 um 11:01 schrieb Steffen Ritter <info at rs-websystems.de>:

> Am 12.08.2010 10:55, schrieb Michael Ruhdorfer:
>> does anybody know what i am doing wrong?
> not thinking the extbase (object-orientated) way.
> 
> you have company and employs,
> 
> so to speak, the company the employe works for is an attribut of himself, if not you would not like to query "company of employe".
> 
> so if you need this, add this attribute to the model directing back to the company. Circular relations is no problem for extbase anymore.
> 
> then you can query {employe.company} if you implemented __toString() or {emploey.company.name}
> 
> furthermore you can query or sort by company just giving the "object" paht.
> 
> $query->equals('company.city', 'munich');
> setOrderings(array('company.zip' => ...));
> 
> regards
> 
> Steffen
> _______________________________________________
> TYPO3-project-typo3v4mvc mailing list
> TYPO3-project-typo3v4mvc at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc


More information about the TYPO3-project-typo3v4mvc mailing list