[Flow] Remove problem

Mathis Hoffmann mathis at hoffpost.de
Wed May 15 18:25:55 CEST 2013


Hi Reens,

I just found out, that it seems to be a general problem (that maybe came 
up with a Flow update??). I now have the same problem on several 
update-actions (that have been working some weeks ago and nothing 
important except a Flow update has changed since that): Without 
persistAll() nothing will be changed (or deleted) in the database. When 
I call persist all, everything works as expected.

Best regards
Mathis

---
Mathis Hoffmann
Tilsiter Straße 14
70374 Stuttgart

Telefon: 0711 / 933 018 87
Mobil: 0176 235 747 41
E-Mail: mathis at hoffpost.de

Am 15.05.2013 17:11, schrieb Mathis Hoffmann:
> Hi Reens,
>
> yes, I'm using the current master of Flow 2.0 (I did an update via 
> composer some days ago) and the request has been a GET request.
>
> Hope, that helps!
>
> @Johannes: Hmm.. I'm not sure about that. I never had any problems 
> with my remove actions before (and I have not yet configured anything 
> concerning security before). I think Flow should not do anything 
> concerning security, if the security context is disabled (like in my 
> application), doesn't it?
>
> Best regards
> Mathis
>
> Am 14.05.2013 21:36, schrieb Rens Admiraal:
>> Hi Mathis,
>>
>> Can you let us know of you're running on the current master branch of 
>> flow, and if the request in which you try to delete the entities is a 
>> GET request?
>>
>> Greet,
>> Rens
>>
>> Johannes <johannes at var-dumper.de>schreef:
>>
>>> Hi Mathis,
>>>
>>> i'm not pretty sure about this behavior but what does your policy 
>>> look like?
>>> I think by default the remove-action is disabled / not working.
>>>
>>> Have a look at the chapter about policies aka ACL's:
>>> http://docs.typo3.org/flow/TYPO3FlowDocumentation/TheDefinitiveGuide/PartIII/Security.html 
>>>
>>>
>>> Johannes
>>>
>>>
>>> Am 14.05.2013 um 15:02 schrieb Mathis Hoffmann <mathis at hoffpost.de>:
>>>
>>>> Hi David,
>>>>
>>>> thank you for your reply!
>>>>
>>>> OrphanRemoval has not been the solution. The problem is, that 
>>>> orphanRemoval only works for OneToMany and OneToOne associations to 
>>>> cascade the delete operation to privatly owned associated objects 
>>>> (in my case it's a ManyToOne assoc, which is not privatly owned).
>>>>
>>>> The (in my opinion a bit hacky) solution I just found is to call 
>>>> $this->persistenceManager->persistAll() after removing the object 
>>>> from the repository.
>>>>
>>>> @ the Flow team:
>>>> Maybe this would be something for the bug tracker (of cause I can 
>>>> post my code, if necessary for that) because for me that doesn't 
>>>> look like a feature ;).
>>>>
>>>> Yours
>>>> Mathis
>>>>
>>>> Am 14.05.2013 11:13, schrieb David Sporer:
>>>>> Hi Mathis,
>>>>>
>>>>> try to set orphanRemoval to true.
>>>>>
>>>>> @ORM\OneToMany(mappedBy="yourVar", orphanRemoval=true)
>>>>>
>>>>>
>>>>> Best regards
>>>>>
>>>>> David
>>>>>
>>>>>
>>>>>
>>>>> 2013/5/13 Mathis Hoffmann <mathis at hoffpost.de>
>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> I have two entities that both have it's own repository. The first 
>>>>>> one,
>>>>>> called Payment, has a reference to the second one (ManyToOne). 
>>>>>> The second
>>>>>> one, called PaymentCategory, has to subclasses, called
>>>>>> IncomingPaymentCategory and OutgoingPaymentCategory and does not 
>>>>>> reference
>>>>>> "Payment". The root-class itself (PaymentCategory) is abstract. I
>>>>>> configured the inheritance type "joined" using the corresponding 
>>>>>> annotation
>>>>>> on "PaymentCategory". Creating and updating incoming and outgoing 
>>>>>> payments
>>>>>> works fine. But deleting them is rejected without any error - 
>>>>>> even if there
>>>>>> are no payments referencing to the category that I try to delete. 
>>>>>> I even
>>>>>> set the PaymentCategory-reference in "Payment" to "nullable=true" 
>>>>>> to avoid
>>>>>> any problems on the database-side and deleting the categories 
>>>>>> manually
>>>>>> works well.
>>>>>>
>>>>>> Does anyone know how to get deleting the entities work in Flow?
>>>>>>
>>>>>> Yours
>>>>>> Mathis Hoffmann
>>>>>> ______________________________**_________________
>>>>>> Flow mailing list
>>>>>> Flow at lists.typo3.org
>>>>>> http://lists.typo3.org/cgi-**bin/mailman/listinfo/flow<http://lists.typo3.org/cgi-bin/mailman/listinfo/flow> 
>>>>>>
>>>>>>
>>>>>
>>>> _______________________________________________
>>>> Flow mailing list
>>>> Flow at lists.typo3.org
>>>> http://lists.typo3.org/cgi-bin/mailman/listinfo/flow
>>> _______________________________________________
>>> Flow mailing list
>>> Flow at lists.typo3.org
>>> http://lists.typo3.org/cgi-bin/mailman/listinfo/flow
>> _______________________________________________
>> Flow mailing list
>> Flow at lists.typo3.org
>> http://lists.typo3.org/cgi-bin/mailman/listinfo/flow
>
>
>
> _______________________________________________
> Flow mailing list
> Flow at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/flow



More information about the Flow mailing list