Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Semantics correction on fk generated relationships.

  • Loading branch information...
commit 179cc72697e85ac50400282ee64d2ba4c68d2aa1 1 parent 5d13452
@rkhaotix rkhaotix authored
Showing with 7 additions and 6 deletions.
  1. +7 −6 libpgmodeler/src/baserelationship.cpp
View
13 libpgmodeler/src/baserelationship.cpp
@@ -179,14 +179,15 @@ void BaseRelationship::setMandatoryTable(unsigned table_id, bool value)
{
if(rel_type==RELATIONSHIP_11)
lables[label_id]->setComment("(" + cmin + ",1)");
- else if(rel_type==RELATIONSHIP_1N || rel_type==RELATIONSHIP_FK)
+ else if(rel_type==RELATIONSHIP_1N)
{
aux=(table_id==SRC_TABLE ? "1" : "n");
-
- if(rel_type==RELATIONSHIP_1N)
- lables[label_id]->setComment("(" + cmin + "," + aux + ")");
- else
- lables[label_id]->setComment("(" + aux + ")");
+ lables[label_id]->setComment("(" + cmin + "," + aux + ")");
+ }
+ else if(rel_type==RELATIONSHIP_FK)
+ {
+ aux=(table_id==SRC_TABLE ? "n" : "1");
+ lables[label_id]->setComment("(" + aux + ")");
}
else if(rel_type==RELATIONSHIP_NN)
lables[label_id]->setComment("(n)");
Please sign in to comment.
Something went wrong with that request. Please try again.