Skip to content

Loading…

DDC-641: Conversion from annotation to xml mapping not matching XML schema (Cascade persist) #5151

Closed
doctrinebot opened this Issue · 1 comment

2 participants

@doctrinebot

Jira issue originally created by user frantisek.troster:

Hi,

I'm converting schema from annotations to XML, but the result doesn't match XML schema:

/****
 * @ManyToMany(targetEntity="ECommerceProduct", cascade={"persist"})
 * @JoinTable(name="ecommerce*carts*products",
        joinColumns={@JoinColumn(name="cart_id", referencedColumnName="id")},
        inverseJoinColumns={@JoinColumn(name="product_id", referencedColumnName="id")})
*/

gets converted to:

<many-to-many field="related" target-entity="ECommerceProduct" inversed-by="par-relates">
....
          <cascade>
            <persist/>
          </cascade>
.....

but the XML schema allows only:

<xs:complexType name="cascade-type">
  <xs:sequence>
    <xs:element name="cascade-all" type="orm:emptyType" minOccurs="0"/> 
    <xs:element name="cascade-persist" type="orm:emptyType" minOccurs="0"/> 
    <xs:element name="cascade-merge" type="orm:emptyType" minOccurs="0"/> 
    <xs:element name="cascade-remove" type="orm:emptyType" minOccurs="0"/> 
    <xs:element name="cascade-refresh" type="orm:emptyType" minOccurs="0"/> 
  </xs:sequence>
</xs:complexType>

Thank you.

@doctrinebot

Issue was closed with resolution "Fixed"

@jwage jwage was assigned by doctrinebot
@doctrinebot doctrinebot added this to the 2.0-BETA3 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.