[TYPO3-mvc] Adding new records does not consider newRecordStoragePid

Dirk Rauscher dr_typo3 at itb-institut.de
Fri Aug 12 11:58:52 CEST 2011


Hello members

my extension recieves a data array from a flash application and makes a 
domain model object from it.
Now i want to store this object as a new record in the database. 
Therefore i call this code that works as expected:

...
         
require_once(t3lib_extMgm::extPath('itb_memento').'Classes/Domain/Repository/ItemFlashPropertyRepository.php');

         $repo = 
t3lib_div::makeInstance('Tx_ItbMemento_Domain_Repository_FlashAppStateRepository');
         $repo->add($obj);
         $repo->_persistAll(); #this method calls the repository's 
persistenceManager persistAll() method
...

The object is stored in the database and everything's fine except that 
the typoscript configuration 
(plugin.myExt.persistence.class.Tx_ItbMemento_Domain_Model_FlashAppState.newRecordStoragePid) 
seems to be ignored. All records are stored into pid 0 which is the 
default behaviour.

How can i force newRecordStoragePid to be considered and store the new 
records in the appropriate PID?

Cheers Dirk


More information about the TYPO3-project-typo3v4mvc mailing list