Skip to content


DDC-263: YAML and XML Driver do not support cascading options "all", "detach". Also: Improvement of YAML Syntax (Patch attached) #3363

doctrinebot opened this Issue · 6 comments

1 participant


Jira issue originally created by user shurakai:

Hi there,

I've attached a small patch which addresses the following issues:

-> YAML did not support cascading options "all" (as described in documentation) and "detach" (as used in AssociationMapping class). The attached patch fixes that.

-> XML does not support these things either, but the attached patch DOES NOT FIX THAT (see below).

Also addressed:

YAML had syntax like cascadeRemove, cascadePersist etc., but the documentation for the annotation driver uses only "persist, remove" etc.

This patch changes the syntax to the following:

cascade: [ persist, remove ]



  • persist
  • remove

(Both work!)

It is now also possible to use cascade: [all]

The YAML Driver was changed in that way that he must not know about the currently supported cascate actions. This has been pushed towards the AssociationMapping and I strongly believe that this is the right way.

On the other hand, I did not* change the XML Driver functionality. It does still know about the cascade actions and does most probably *not support the detach and "all" actions. That should be fixed, but won't take too long.


Comment created by shurakai:

  • YAML Driver fixed.
  • XML Driver fixed (supports now both cascade-persist and (because the other drivers do not use the prefixed cascade-) single "persist")

  • I've modified the UnitTests to cover cascade="all" for XML & YAML


Comment created by romanb:

That patch looks good but there seem to be tabs in your patches. Please make sure that you use "soft tabs" (4 spaces) in your editor.


Comment created by shurakai:

Resolved tab issue.


Comment created by romanb:

Patch applied. Thanks! So this will be included in todays ALPHA4 release.


Issue was closed with resolution "Fixed"

@doctrinebot doctrinebot added this to the 2.0-ALPHA4 milestone
@doctrinebot doctrinebot closed this
@doctrinebot doctrinebot added the Bug label
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.