[Flow] Remove problem

Rens Admiraal rens.admiraal at typo3.org
Tue May 14 21:36:37 CEST 2013


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


More information about the Flow mailing list