> From: Piotr Kaczyński <p.kaczyn...@uksw.edu.pl> > Sent: Thu, May 19, 2011 3:04:28 PM > > > First of all, thanks for the great software to the author.
Piotr - You are welcome. > > I am currently using django model creation utility > (gends_run_gen_django.py ) to create models out of xsd files. Great. I'm glad that it might be of some use. > 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. This is likely a mistake on my part. I'm not a Django expert, and I really struggle and grope when working with a relational database model. Possibly we should be generating ManyToManyField instead of ForeignKey? I'll take a look. But, since I suspect that you understand this better than I do, you might be better off if you figure out what code you think it should generate then either let me know or modify django/generatedssuper.py in the distribution yourself. If you have suggestions about the correct code to generate, please let me know. > > 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. I do not understand relational database talk very well, but I think I understand what you mean here. Would replacing ForeignKey with ManyToManyField fix this? Or, do we have to put the ForeignKey at the other end? When I wrote that code, I wondered about that. I'll take another look. Maybe I'll learn something. > > 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... > This email list (generateds-users@lists.sourceforge.net) is a good place to talk about generateDS.py. But, answering your questions does take some Django expertise, so you are likely to get better answers to questions about Django models at django-user (http://groups.google.com/group/django-users). Either way, let me know what I can do to help out. And, like I say, I'll take another look at that code. - Dave -- Dave Kuhlman http://www.rexx.com/~dkuhlman ------------------------------------------------------------------------------ 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