Skip to content

Commit

Permalink
Make suggested changes
Browse files Browse the repository at this point in the history
  • Loading branch information
hasathcharu committed Mar 14, 2024
1 parent e99e5fc commit f93f643
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 15 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,6 @@ bin/
# Ballerina
velocity.log*
*Ballerina.lock

# Jar Dependency Versions
version.properties
Original file line number Diff line number Diff line change
Expand Up @@ -479,16 +479,14 @@ private static ModuleMemberDeclarationNode createEntityRecord(Entity entity, boo
recordFields.append(BalSyntaxConstants.SPACE);
} else if (field.getRelation() != null) {
if (field.getRelation().isOwner()) {

for (Relation.Key key : field.getRelation().getKeyColumns()) {
addConstraintsAnnotationForForeignKey(field, recordFields);
recordFields.append(key.getType());
recordFields.append(BalSyntaxConstants.SPACE);
recordFields.append(key.getField());
recordFields.append(BalSyntaxConstants.SEMICOLON);
recordFields.append(BalSyntaxConstants.SPACE);
}

for (Relation.Key key : field.getRelation().getKeyColumns()) {
addConstraintsAnnotationForForeignKey(field, recordFields);
recordFields.append(key.getType());
recordFields.append(BalSyntaxConstants.SPACE);
recordFields.append(key.getField());
recordFields.append(BalSyntaxConstants.SEMICOLON);
recordFields.append(BalSyntaxConstants.SPACE);
}
}
} else {
addConstrainAnnotationToField(field, recordFields);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ EXAMPLES
$ bal persist pull --help

Generate data model by introspecting database.
$ bal persist pull --datastore mysql --host localhost --port 3306 --user root --database db
$ bal persist pull --datastore mysql --host localhost --port 3306 --user root --database db
4 changes: 0 additions & 4 deletions persist-cli/src/main/resources/version.properties

This file was deleted.

0 comments on commit f93f643

Please sign in to comment.