Subject: | problem with processing of aggregation/composition in UML mode |
Date: | Wed, 04 Dec 2013 18:27:49 +0400 |
To: | bug-Parse-Dia-SQL [...] rt.cpan.org |
From: | Andrej Shalaev <andrews [...] seventest.ru> |
Hello!
Parse-Dia-SQL version: 0.25
Dia version: 0.97.1
The example file composition.dia contains two entities: 'one' and 'two'.
Entity 'one' composes many entities of 'two'
Below is the log of parsediasql binary execution:
=====
$ parsediasql --uml --file composition.dia --db postgres >
composition.sql
Use of uninitialized value in addition (+)
at /usr/local/share/perl/5.10.1/Parse/Dia/SQL.pm line 1725.
Use of uninitialized value in addition (+)
at /usr/local/share/perl/5.10.1/Parse/Dia/SQL.pm line 1725.
[INFO] components is an empty ARRAY ref
=====
We can see warnings at SQL.pm line 1725. Resulting composition.sql
contains next command:
=====
alter table two add constraint two_fk_One_id
foreign key (one_id)
references one (id) ;
=====
As we can see, there's no ON DELETE CASCADE constraint which should be
added regarding tedia2sql documentation:
=====
UML mode
Whichever side is aggregate or composition is the 'one' side in the
one-to-many relationship. The multiplicity of the other side may be
specified in the usual way.
If the relationship is aggregate, a on delete set NULL is added to the
foreign key constraint in databases that support it; if it is a
composition, then on delete cascade is added instead.
=====
Same situation has to be for aggregation (ON DELETE SET NULL is not
presented).
Thank you for your product and for your attention!
Message body is not shown because sender requested not to inline it.
Message body not shown because it is not plain text.