[TYPO3-mvc] MM (many to many) how to tca.php
Jochen Rau
jochen.rau at typoplanet.de
Fri Apr 30 21:51:41 CEST 2010
Hi Cornelius.
On 30.04.10 20:02, Cornelius Illi wrote:
> DataMapper.php #352
> $constraint = $query->equals($columnMap->getParentKeyFieldName(),
> $parentObject );
> Does not seem like I have any chance to do so without altering the core.
The parent key field name is set to 'uid_foreign' by the DataMapFactory.
So, no chance to alter that atm (will be possible in the future). But
can try to map the field 'unternehmen_nr' (assuming that the field
values are unique) to the property 'uid' by the following TypoScript
Settings
config.tx_extbase.persistence.classes.Tx_xx_Domain_Model_Unternehmen.mapping.columns.unternehmen_nr.mapOnProperty
= uid
And to your model (not really necessary):
public function setUnternehmerNr($unternehmerNr) {
$this->uid = $unternehmerNr;
}
public function getUnternehmerNr() {
return $this->uid;
}
It's not proven but should work.
Regards
Jochen
P.S. Please don't TOFU ;-)
http://en.wikipedia.org/wiki/Posting_style#Top-posting
More information about the TYPO3-project-typo3v4mvc
mailing list