[TYPO3-mvc] Tx_Extbase_Persistence_ObjectStorage problem
Eat Dimanche
eat.dimanche at yejj.com
Thu Dec 31 11:47:32 CET 2009
Hi Michael,
I am working on both ways:
- First, I am working to create MM table as you recommend
- Second, I am still continuing with my way, but I was wondering
that it's working, when the new number of services is smaller than the
previous one. if we add services, it's not working any more.
Here is my update function:
public function updateAction(Tx_YejjMembers_Domain_Model_Member $member) {
$this->memberRepository->update($member);
$this->flashMessages->add('Your member has been updated.');
$this->redirect('index');
}
Thanks,
Dimanche
Michael Knoll wrote:
> Hi Dimanche,
>
> in my opinion, you should not use comma seperated lists as a subsitute
> for a real MM-relation. I'm not sure, whether ExtBase can handle comma
> seperated lists in its persistence classes (I think so, as there is an
> example for fe_users and fe_groups shipped with ExtBase), but I would
> strongly recommend to use real M:M tables to solve this problem.
>
> In my extension, MM tables are correctly resolved!
>
> Greetings
>
> Michael
>
>
>
>
> Eat Dimanche schrieb:
>> Hi,
>>
>> >> I have two tables have relationship to each other: "member" &
>> "service". For each member can have 1..* on service.
>>
>> >> In table member I have stored the services separately by comma.
>> For example:
>>
>> >> table member
>> -----------------------
>> uid name service
>> -----------------------
>> 1 Sok 1,2
>> 2 Sao 2,3
>> 3 Dimanche 4
>> -----------------------
>>
>> >> table service
>> -------------
>> uid name
>> -------------
>> 1 AA
>> 2 BB
>> 3 CC
>> 4 DD
>> 5 EE
>> -------------
>>
>> >> I am working in the backend it works properly. But now, I would like
>> to update service in the frontend. I can't. The value always be null
>> in database when I updated.
>> >> For editing form I am using multiple selection box. For property
>> service is assigned type as Tx_Extbase_Persistence_ObjectStorage, also
>> method getter and setter same relatedPosts.
>>
>>
>> Could anyone help me for this problem?
>> Thanks a lot.
>>
>> Best regards,
>> Dimanche
More information about the TYPO3-project-typo3v4mvc
mailing list