[TYPO3-mvc] Problems with table mapping

Manfred Rutschmann manfred.rutschmann at revier.de
Fri Apr 15 16:02:41 CEST 2011


Hi @all,

problem one with mapping is resolved, now here comes a new one:

I have Object A (it`s a typo3 table) and my mapped Object B. I create a new
Object A and attach Object B to it, after then the Object A goes in the
repository. But the Object is not attached in the table row. Any tips where
the objects are changed before it`s going persistent?

By example:

	public function generateAction(){
		//$attachment =
&t3lib_div::makeInstance("Tx_Dspremium_Domain_Model_PhpbbAttachments");
		$attachments =
$this->phpbbAttachmentsRepository->findPart(0,10)->toArray();
		foreach ($attachments as $var) {
			$exifData = new Tx_Dspremium_Domain_Model_Imageexif;
			$exifData->setAttachment($var);
			$this->imageexifRepository->add($exifData);
		}
		//$this->view->assign("attachments",$attachments);
	}


gives me this one:

Array
(
    [0] => Tx_Dspremium_Domain_Model_PhpbbAttachments Object
        (
            [attach_id:protected] => 43
            [post_msg_id:protected] => 285
            [topic_id:protected] => 57
            [in_message:protected] => 0
            [poster_id:protected] => 63
            [is_orphan:protected] => 0
            [physical_filename:protected] =>
63_30b96ff657060380bf6ba37018bb8f53
            [real_filename:protected] => DSC_4906.jpg
            [download_count:protected] => 68
            [attach_comment:protected] => 
            [extension:protected] => jpg
            [mimetype:protected] => 
            [filesize:protected] => 34006
            [filetime:protected] => 1249215921
            [thumbnail:protected] => 1
            [in_ug:protected] => 
            [uid:protected] => 0
            [_localizedUid:protected] => 0
            [_languageUid:protected] => 
            [pid:protected] => 0
            [_isClone:private] => 
            [_cleanProperties:private] => Array
                (
                    [attach_id] => 43
                    [post_msg_id] => 285
                    [topic_id] => 57
                    [in_message] => 0
                    [poster_id] => 63
                    [is_orphan] => 0
                    [physical_filename] =>
63_30b96ff657060380bf6ba37018bb8f53
                    [real_filename] => DSC_4906.jpg
                    [download_count] => 68
                    [attach_comment] => 
                    [extension] => jpg
                    [mimetype] => 
                    [filesize] => 34006
                    [filetime] => 1249215921
                    [thumbnail] => 1
                    [in_ug] => 
                    [uid] => 0
                    [pid] => 0
                )

        )

the problem i think is in the attached object property uid. Whe the row
goes his way to the table there some hardcoded uid like before. At this
point i have to read the uuid again from the attached object. Does anybody
know where the place for this is?

Regards Manne


More information about the TYPO3-project-typo3v4mvc mailing list