[TYPO3-mvc] Problem after Upgrading to 1.1 / 1:M relation

Jochen Rau jochen.rau at typoplanet.de
Wed Apr 14 20:22:08 CEST 2010


Hi Michael.

On 14.04.10 14:05, Michael Feinbier wrote:
> Hi Everybody,
>
> I just updated an Extension based on extbase 1.0.2 to the current 1.1 beta.
> But now the 1:m relation I defined in the models stoped working.
>
> The Error-Message is:
>> #1247602160: Table 'tx_extbase_persistence_objectstorage' doesn't exist
>
> caused by
>> 33
>> Tx_Extbase_Persistence_Mapper_DataMapper::fetchRelated(Tx_WelleTables_Domain_Model_Programm,
>> "milieus", "6", boolean, boolean)
>
> So I think the Error seems to be in the 'milieus' property of my
> Tx_WelleTables_Domain_Model_Programm model
> which looks like this
>
>> class Tx_WelleTables_Domain_Model_Programm extends
>> Tx_Extbase_DomainObject_AbstractEntity {
>> ...
>> /**
>> * Related Milieus
>> *
>> * @var
>> Tx_Extbase_Persistence_ObjectStorage<Tx_WelleTables_Domain_Model_Milieu>
>> * @lazy
>> * @cascade remove
>> */
>> protected $milieus;
>> ...
>>
>> /**
>> * @return Tx_Extbase_Persistence_ObjectStorage
>> */
>> public function getMilieus() {
>> return $this->milieus;
>> }
>> ...
>> }
>
> I have no idea what I did wrong in comparison to the blog_example. :(
>
> Any ideas?

This is a change in behavior in the beta version (which should not 
happen) caused a bug in IRRE. The default value of "maxitems" is 1 as 
documented in

http://typo3.org/documentation/document-library/core-documentation/doc_core_api/4.3.0/view/4/2/#id2529282

In t3lib_TCEforms_inline the default is set to 100000 in line 192:

if (!$maxitems)	$maxitems=100000;

Extbase determines the cardinality (1:1, 1:n, m:n) of the relation by 
taking the maxitems (and since 1.1.0beta2 its default setting 1) into 
account.

I assume that your TCA definition of the column "milieus" is of type 
"inline" and has no 'maxitems' => 99999. Could you confirm this?

Regards
Jochen



More information about the TYPO3-project-typo3v4mvc mailing list