File tree Expand file tree Collapse file tree 7 files changed +10
-10
lines changed
templates/cli/lib/type-generation/languages Expand file tree Collapse file tree 7 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ class Dart extends LanguageMeta {
23
23
break;
24
24
case AttributeType.RELATIONSHIP:
25
25
type = LanguageMeta.toPascalCase(attribute.relatedCollection);
26
- if ((attribute.relationType === 'oneToMany' && attribute.side === 'parent') || attribute.relationType === 'manyToMany') {
26
+ if ((attribute.relationType === 'oneToMany' && attribute.side === 'parent') (attribute.relationType === 'manyToOne' && attribute.side === 'child') || || attribute.relationType === 'manyToMany') {
27
27
type = `List< ${type}>`;
28
28
}
29
29
break;
Original file line number Diff line number Diff line change @@ -13,17 +13,17 @@ class Java extends LanguageMeta {
13
13
type = "String";
14
14
break;
15
15
case AttributeType.INTEGER:
16
- type = "Integer ";
16
+ type = "int ";
17
17
break;
18
18
case AttributeType.FLOAT:
19
- type = "Double ";
19
+ type = "double ";
20
20
break;
21
21
case AttributeType.BOOLEAN:
22
- type = "Boolean ";
22
+ type = "boolean ";
23
23
break;
24
24
case AttributeType.RELATIONSHIP:
25
25
type = LanguageMeta.toPascalCase(attribute.relatedCollection);
26
- if ((attribute.relationType === 'oneToMany' && attribute.side === 'parent') || attribute.relationType === 'manyToMany') {
26
+ if ((attribute.relationType === 'oneToMany' && attribute.side === 'parent') || (attribute.relationType === 'manyToOne' && attribute.side === 'child') || attribute.relationType === 'manyToMany') {
27
27
type = "List< " + type + ">";
28
28
}
29
29
break;
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ class JavaScript extends LanguageMeta {
28
28
break;
29
29
case AttributeType.RELATIONSHIP:
30
30
type = LanguageMeta.toPascalCase(attribute.relatedCollection);
31
- if ((attribute.relationType === 'oneToMany' && attribute.side === 'parent') || attribute.relationType === 'manyToMany') {
31
+ if ((attribute.relationType === 'oneToMany' && attribute.side === 'parent') || (attribute.relationType === 'manyToOne' && attribute.side === 'child') || attribute.relationType === 'manyToMany') {
32
32
type = `Array< ${type}>`;
33
33
}
34
34
break;
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ class Kotlin extends LanguageMeta {
23
23
break;
24
24
case AttributeType.RELATIONSHIP:
25
25
type = LanguageMeta.toPascalCase(attribute.relatedCollection);
26
- if ((attribute.relationType === 'oneToMany' && attribute.side === 'parent') || attribute.relationType === 'manyToMany') {
26
+ if ((attribute.relationType === 'oneToMany' && attribute.side === 'parent') || (attribute.relationType === 'manyToOne' && attribute.side === 'child') || attribute.relationType === 'manyToMany') {
27
27
type = `List< ${type}>`;
28
28
}
29
29
break;
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ class PHP extends LanguageMeta {
26
26
break;
27
27
case AttributeType.RELATIONSHIP:
28
28
type = LanguageMeta.toPascalCase(attribute.relatedCollection);
29
- if ((attribute.relationType === 'oneToMany' && attribute.side === 'parent') || attribute.relationType === 'manyToMany') {
29
+ if ((attribute.relationType === 'oneToMany' && attribute.side === 'parent') || (attribute.relationType === 'manyToOne' && attribute.side === 'child') || attribute.relationType === 'manyToMany') {
30
30
type = "array";
31
31
}
32
32
break;
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ class Swift extends LanguageMeta {
23
23
break;
24
24
case AttributeType.RELATIONSHIP:
25
25
type = LanguageMeta.toPascalCase(attribute.relatedCollection);
26
- if ((attribute.relationType === 'oneToMany' && attribute.side === 'parent') || attribute.relationType === 'manyToMany') {
26
+ if ((attribute.relationType === 'oneToMany' && attribute.side === 'parent') || (attribute.relationType === 'manyToOne' && attribute.side === 'child') || attribute.relationType === 'manyToMany') {
27
27
type = `[${type}]`;
28
28
}
29
29
break;
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ class TypeScript extends LanguageMeta {
28
28
break;
29
29
case AttributeType.RELATIONSHIP:
30
30
type = LanguageMeta.toPascalCase(attribute.relatedCollection);
31
- if ((attribute.relationType === 'oneToMany' && attribute.side === 'parent') || attribute.relationType === 'manyToMany') {
31
+ if ((attribute.relationType === 'oneToMany' && attribute.side === 'parent') || (attribute.relationType === 'manyToOne' && attribute.side === 'child') || attribute.relationType === 'manyToMany') {
32
32
type = `${type}[]`;
33
33
}
34
34
break;
You can’t perform that action at this time.
0 commit comments