Hi,

First of all, thanks for the great software to the author.

I am currently using django model creation utility (gends_run_gen_django.py ) to create models out of xsd files. However, I am actually not sure if those model generated are correct, i.e. foreign keys are inserted into models that has "one" multiplicity in a relationship.

Look at the attachment - ZPWP element can have unbounded number of PM elements, i.e. we have a relationship ZPWP(1) - (n)PM. But in the generated models file we have Foreigh key to PM in ZPWP. That means whe have a relation ZPWP(n)-(1)PM.

Is it a correct situation or I don't understand it correctly?

Thanks for any answer,
Piotr Kaczynski

P.S. I had a problem with reporting some issues I've found. Where should I put it? In the sourceforge tracker? There's no clear information about it. Also e-mail to the author as stated on www.rexx.com/~dkuhlman/generateDS.html is not workig...




from django.db import models


class Komunikat_model(models.Model):
    Naglowek = models.ForeignKey("Naglowek_model")
    Tresc = models.ForeignKey("Tresc_model")
    def __unicode__(self):
        return "id: %s" % (self.id, )

class Naglowek_model(models.Model):
    kod_kom = models.CharField(max_length=1000, blank=True, null=True)
    data = models.DateField(blank=True, null=True)
    kod_obiektu = models.CharField(max_length=1000, blank=True, null=True)
    data_utworzenia = models.CharField(max_length=1000, blank=True, null=True)
    wersja = models.CharField(max_length=1000, blank=True, null=True)
    id = models.CharField(max_length=1000, blank=True, null=True, 
primary_key=True)
    ref_id = models.CharField(max_length=1000, blank=True, null=True)
    def __unicode__(self):
        return "id: %s" % (self.id, )

class PM_model(models.Model):
    TYP = models.CharField(max_length=1000, blank=True, null=True)
    DCZO = models.CharField(max_length=1000, blank=True, null=True)
    POBC = models.IntegerField(blank=True, null=True)
    def __unicode__(self):
        return "id: %s" % (self.id, )

class Tresc_model(models.Model):
    ZPWP = models.ForeignKey("ZPWP_model")
    def __unicode__(self):
        return "id: %s" % (self.id, )

class ZPWP_model(models.Model):
    KJWCD = models.CharField(max_length=1000, blank=True, null=True)
    NJWCD = models.CharField(max_length=1000, blank=True, null=True)
    ZRD = models.CharField(max_length=1000, blank=True, null=True)
    DOP = models.CharField(max_length=1000, blank=True, null=True)
    DDP = models.CharField(max_length=1000, blank=True, null=True)
    DOK = models.CharField(max_length=1000, blank=True, null=True)
    DDK = models.CharField(max_length=1000, blank=True, null=True)
    OPP = models.CharField(max_length=1000, blank=True, null=True)
    OPK = models.CharField(max_length=1000, blank=True, null=True)
    KEL = models.CharField(max_length=1000, blank=True, null=True)
    KOSP = models.CharField(max_length=1000, blank=True, null=True)
    JDU = models.CharField(max_length=1000, blank=True, null=True)
    PM = models.ForeignKey("PM_model")
    def __unicode__(self):
        return "id: %s" % (self.id, )

Attachment: ZPWP.xsd
Description: XML document

------------------------------------------------------------------------------
What Every C/C++ and Fortran developer Should Know!
Read this article and learn how Intel has extended the reach of its 
next-generation tools to help Windows* and Linux* C/C++ and Fortran 
developers boost performance applications - including clusters. 
http://p.sf.net/sfu/intel-dev2devmay
_______________________________________________
generateds-users mailing list
generateds-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/generateds-users

Reply via email to