From: <oli...@t-...> - 2011-10-25 05:31:42
|
BTW I have released dia2code 0.8.4 where the association name bug is fixed (https://bugs.launchpad.net/ubuntu/+source/dia2code/+bug/442295) -- Oliver ----- Original message ----- From: "oli...@t-..." <oli...@t-...> To: "Germán" <ger...@ya...>, dia...@li... Subject: Re: [Dia2code-general] Newcomer, old user, help offered, patch for SQL module 0.83 Sent: Mon, 17 Oct 2011 22:39:25 +0200 On 2011-10-17, Germán <ger...@ya...> wrote: > > Alejandro patch(parse_diagram.patch) solves the same problem as > that of ftdebugger. Likewise, I do not have the necessary knowledge > on the code to decide what is the best solution. Okay. I looked again at Alejandro's parse_diagram.patch and I think it is redundant to ftdebugger's patch. > if you used the patch of Ftdebugger, you can continue applying the patch > from Alejandro to make use of the feature "surrogate > keys"(generate_code_sql.patch). Okay, I did that: RCS file: /cvsroot/dia2code/dia2code/dia2code/generate_code_sql.c,v ---------------------------- revision 1.5 date: 2011/10/17 20:26:54; author: okellogg; state: Exp; lines: +24 -1 Apply generate_code_sql.patch by Alejandro Imass, see > [...] > 3) In generate_code_sql.c you are assuming that the FK columns have > the same name on both sides (which is not very common), and with with > the advent and ever-popular use of ORM technologies such as Propel > (PHP) and DBIx::Class (Perl) the current naming convention/trend is to > work with simple serial "surrogate keys", and FKs are 'standardized' > to the form xxx_id where xxx is the FK table and the FK is _always_ > "id". So in the attached patch, I check for this convention and warn > if not being used. ---------------------------- > And finally, you can apply the patch > that fixes the problem I found. Yes, I did that also in generate_code_sql.c revision 1.5 Hope this helps, Oliver ------------------------------------------------------------------------------ All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity and more. Splunk takes this data and makes sense of it. Business sense. IT sense. Common sense. http://p.sf.net/sfu/splunk-d2d-oct _______________________________________________ Dia2code-general mailing list Dia...@li... https://lists.sourceforge.net/lists/listinfo/dia2code-general |