[TYPO3-mvc] How to assign target pid forTx_Extbase_Persistence_Repository::add
Nikolas Hagelstein
hagelstein at shr.cc
Thu Jun 18 12:02:44 CEST 2009
Hi,
hmm i just played arround a little.
Am I right saying, that atm there is no way to assign a pid manually?.
I tried to set the pid property of my object within the controller right
before "add". But it gets overwritten with
TSFE:id.
A short grep pid over extbase unearth the following:
---
Classes/Persistence/Mapper/ObjectRelationalMapper.php
635: if ($dataMap->hasPidColumn()) {
636: // TODO Should we merge the settings from $this->cObj into the
extension settings (in the dispatcher)
637: $row['pid'] = !empty($this->cObj->data['pages']) ?
$this->cObj->data['pages'] : $GLOBALS['TSFE']->id;
638: }
Classes/Persistence/Mapper/DataMap.php:
306: public function hasPidColumn() {
307: // TODO Should we implement a check for having a pid column?
308: return TRUE;
309: }
Classes/Persistence/Mapper/DataMap.php
144: protected function addCommonColumns() {
145: // TODO Decide whether we should add pid and uid columns by default
146: $this->addColumn('uid',
Tx_Extbase_Persistence_Mapper_ColumnMap::TYPE_INTEGER);
147: $this->addColumn('pid',
Tx_Extbase_Persistence_Mapper_ColumnMap::TYPE_INTEGER);
---
Hmmm cObj of the OjectRelationalMapper isn set hasPidColumn returns true
by default ...dead end right? ;).
Cheers,
Nikolas
More information about the TYPO3-project-typo3v4mvc
mailing list