[FLOW3-general] A question about m-n relation.
Federico Bernardin
typo3list at bernardin.it
Fri Apr 5 14:04:42 CEST 2013
Hi Mario,
I guess user can choose the category from a select menu, so you can obtain it from url together with post, the you can simply add category to your post category property and the FLOW save it for you.
Is that the situation?
Cheers
Federico
Il giorno 05/apr/2013, alle ore 13:34, mario chiari <m at mariochiari.net> ha scritto:
> Hi Søren
>
> thanks for the reply.
> Nope, my situation is a little more complex.
> I try to explain myself in term of the Blog package.
>
> Let us say that we wish to have a form to create a number of Posts (I
> use jQuery to let a user to clone the form as many times as he likes)
>
> So my createAction receives an array of Posts and somehow I create
> corresponding objects by cycling over the array and using
> $propertyMapper->convert($postArray,'\-BLOG-\Domain\Model\Post'). So far
> so good, it works.
>
> Now, say I wish to let a user to associate a Category to the Posts he is
> creating too, where Post-Category is m-n (indeed, he may associate more
> than one category to the same Post).
>
> So the task is to insert the corresponding pairs of
> persistence_object_identifiers into the Post_Category_Join table.
>
> The createAction receives, for each Category, its
> persistence_object_identifier. What I am missing is the
> persistence_object_identifier for the Post which has been just created.
>
> Indeed, I am not sure either about how to write the Insert query I need.
>
> Help is welcome
> thanks, cheers
> mario
>
>
>
>
> On Fri, 2013-04-05 at 00:15 +0200, Søren Malling wrote:
>> Hi Mario,
>>
>> Just pass the object on, either in the view or in a redirect call.
>>
>> You shouldn't worry about the identifier - it's only used internal in TYPO3
>> Flow
>>
>> Regards
>>
>>
>> Søren Malling
>>
>> Twitter: twitter.com/sorenmalling
>>
>>
>> On Fri, Apr 5, 2013 at 12:02 AM, mario chiari <m at mariochiari.net> wrote:
>>
>>> Hello
>>>
>>> I am not able to see the following:
>>>
>>> Say I have a createAction and, when a object is created by something
>>> like $this->domRepository->add($domObj), I need to retrieve its
>>> persistence_object_identifier to be used within the same action.
>>>
>>> How do I do?
>>> Thanks
>>> Cheers
>>> mario
>>>
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> FLOW3-general mailing list
>>> FLOW3-general at lists.typo3.org
>>> http://lists.typo3.org/cgi-bin/mailman/listinfo/flow3-general
>>>
>> _______________________________________________
>> FLOW3-general mailing list
>> FLOW3-general at lists.typo3.org
>> http://lists.typo3.org/cgi-bin/mailman/listinfo/flow3-general
>
>
> _______________________________________________
> FLOW3-general mailing list
> FLOW3-general at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/flow3-general
More information about the FLOW3-general
mailing list