Skip Menu |

This queue is for tickets about the Parse-Dia-SQL CPAN distribution.

Report information
The Basics
Id: 55021
Status: rejected
Priority: 0/
Queue: Parse-Dia-SQL

People
Owner: Nobody in particular
Requestors: barrera.alexis [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: bug ParseDiaSql
Date: Fri, 26 Feb 2010 11:29:33 -0500
To: bug-Parse-Dia-SQL [...] rt.cpan.org
From: Alexis Barrera <barrera.alexis [...] gmail.com>
Hi, thanks for your work. I knew about your script because i couldn't generate the SQL code using tedi2sql with dia 0.97 files and parsediasql was what i found in the web, so thanks for that, again. The issue is this: I generate the SQL code from a dia (0.97) file, using the UML interpretation. To do it i wrote the script, setting the uml variable to true, no problem there, but when it generates the code, it gives a lot of warnings when trying to create the foreign keys. I use PostgreSQL definitions, so there's a lot of serial type attributes in referenced tables, wich is different to the integer type the other table has. I solved thi issue by editing the file 'Utils.pm' and installing the package again. The change i did was to change the line 507: if ( $pktype ne $fktype ) for this: if ( $pktype ne $fktype and $self->{db} ne 'postgres' and $pktype eq 'SERIAL') Which is the original behavior of tedia2sql. So i don't know if you consider this a bug, but i think it's important to allow the creation of FKs in this situation, because that's not actually an error in the data definition. My system info: - Script version: Parse-Dia-SQL-0.13_02 and Parse-Dia-SQL-0.14 - SO: Fedora 12 kernel 2.6.32.7-37.fc12.x86_64 - Perl version: 5.10.0 Thanks again. Keep up the good work.
On Fri Feb 26 11:31:41 2010, barrera.alexis@gmail.com wrote: Show quoted text
> I use PostgreSQL definitions, so there's a lot of serial type > attributes in referenced tables, wich is different to the integer > type the other table has.
Thanks for your interest in Parse-Dia-SQL. The issue you describe should work in version 0.14. Parse::Dia::SQL::Utils::check_att_list_types() calls Parse::Dia::SQL::Utils::get_base_type() which should convert 'serial' to 'integer' and the comparison should be true. I could have a look at it if you sent me your .dia model. Best regards, Andreas --