I have an XSD with

   <xs:element name="recipe">
     <xs:complexType>
       <xs:sequence>

         <xs:element name="title" type="xs:string"/>

         <xs:element name="categories">
           <xs:complexType>
             <xs:sequence>
               <xs:element name="category" type="xs:string" minOccurs="1"
maxOccurs="unbounded"/>
             </xs:sequence>
           </xs:complexType>
         </xs:element>
         ....
       </xs:sequence>
     </xs:complexType>
   </xs:element>

The Django models I get from that are


class Recipe(models.Model):
    title = models.CharField(max_length=1000, )
    categories = models.ForeignKey(
        "CategoriesType",
        related_name="recipe_categories_categoriesType",
    )
    ....

and

class CategoriesType(models.Model):
    category = models.CharField(max_length=1000, )
    ....

This seems wrong to me. I would have thought Category gets a ManyToManyField

to Recipe. The way it comes out of generateDS it looks like a
CategoriesType has many Recipes. Or perhaps my XSD is wrong?

Cheers,
Sven
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
generateds-users mailing list
generateds-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/generateds-users

Reply via email to