Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-641

Conversion from annotation to xml mapping not matching XML schema (Cascade persist)

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0-BETA1
    • Fix Version/s: 2.0-BETA3
    • Component/s: ORM
    • Security Level: All
    • Labels:
      None

      Description

      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.

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Jonathan H. Wage
            Reporter:
            Frantisek Troster
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: