Login | Register
My pages Projects Community openCollabNet

Discussions > commits > svn commit: r318 - trunk: src/org/argouml/language/sql/reveng www/img/reveng

argouml-sql
Discussion topic

Back to topic list

svn commit: r318 - trunk: src/org/argouml/language/sql/reveng www/img/reveng

Author elbedd
Full name Laurent BRAUD
Date 2014-08-31 13:43:53 PDT
Message Author: elbedd
Date: 2014-08-31 13:43:52-0700
New Revision: 318

Modified:
   trunk/src/org/argoum​l/language/sql/reven​g/ModellerP.java
   trunk/www/img/reveng​/ImportedP.png

Log:
Import SQL script : The Modeler P must create a 0..1 association instead of 1..1 if a column of FK is nullable (Modeler C is OK)

Include the new Picture for web site

Modified: trunk/src/org/argoum​l/language/sql/reven​g/ModellerP.java
Url: http://argouml-sql.t​igris.org/source/bro​wse/argouml-sql/trun​k/src/org/argouml/la​nguage/sql/reveng/Mo​dellerP.java?view=di​ff&pathrev=318​&r1=317&r2=318​
====================​====================​====================​==================
--- trunk/src/org/argoum​l/language/sql/reven​g/ModellerP.java (original)
+++ trunk/src/org/argoum​l/language/sql/reven​g/ModellerP.java 2014-08-31 13:43:52-0700
@@ -96,7 +96,7 @@
                         }
                     }
                     
- }
+ }
                 foreign_keys.addAll(​table.getFkDefinitio​ns());
             } // end write class
             
@@ -114,7 +114,14 @@
             
             String nameAssociationEnd = name;
             
-
+ // if at least one column of the FK in the Table is nullable : "0..1", otherwise "1".
+ for (ColumnDefinition columnDefinition : fk.getColumns()) {
+ if (columnDefinition.getNullable() == null || columnDefinition.getNullable()) {
+ multiplicity = Modeller.ASSOCIATION_01;
+ break;
+ }
+ }
+
             Object mAssociationEnd = modellerSource.getAs​sociationEnd(name, mClassifier, mClassifierEnd);
             //setVisibility(mAss​ociationEnd, modifiers);
             Model.getCoreHelper(​).setMultiplicity(

Modified: trunk/www/img/reveng​/ImportedP.png
Url: http://argouml-sql.t​igris.org/source/bro​wse/argouml-sql/trun​k/www/img/reveng/Imp​ortedP.png?view=diff​&pathrev=318​&r1=317&r2=318
====================​====================​====================​==================
Binary files. No diff available.

« Previous message in topic | 1 of 1 | Next message in topic »

Messages

Show all messages in topic

svn commit: r318 - trunk: src/org/argouml/language/sql/reveng www/img/reveng elbedd Laurent BRAUD 2014-08-31 13:43:53 PDT
Messages per page: