[TYPO3-dev] irre 1:n relation without extra field in prarent record (tt_content)

Martin Ficzel martin.ficzel at gmx.de
Fri Jun 29 09:04:54 CEST 2007


i want to assign many records of a custom table to a tt_content record.
so i added a field "parent_uid" to the custom table:

to create and edit the records with i tried those two solutions

1: irre in flexforms

> <my_records>
>   <TCEforms>
>     <label>my_records</label>
>       <config>
>         <type>inline</type>						
>         <foreign_table>my_custom_table</foreign_table>
>         <foreign_field>uid_foreign</foreign_field>
>         <maxitems>10</maxitems>
>       </config>
>    </TCEforms>
> </my_records>

well it was a test and it is showing something but it does'nt work properly.

2: irre in tca

> $tempColumns = Array (
>     "my_records" => Array (        
>         "exclude" => 1,        
>         "label" => "my_records",        
>         "config" => Array (
>             "type" => "inline",    
>             "foreign_table" => 'my_custom_table',
>             "foreign_field" => 'uid_foreign',
> 	      "maxitems" => 10
>         )
>     ),
> );
> 
> t3lib_div::loadTCA("tt_content");
> t3lib_extMgm::addTCAcolumns("tt_content",$tempColumns,1);

these solution works as expeccted but i had to add the field my_records
to the tt_content table ( the form works also without the db-field but
on save a mysql error occurs because irre seems to save the current
record count in this field ).

my questions:

1. is it possible to use irre within flexforms?
2. can i use the irre in 1:n mode without adding a field to the parrent
 table?

regards Martin




More information about the TYPO3-dev mailing list