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 {
2323 break;
2424 case AttributeType.RELATIONSHIP:
2525 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') {
2727 type = `List< ${type}>`;
2828 }
2929 break;
Original file line number Diff line number Diff line change @@ -13,17 +13,17 @@ class Java extends LanguageMeta {
1313 type = "String";
1414 break;
1515 case AttributeType.INTEGER:
16- type = "Integer ";
16+ type = "int ";
1717 break;
1818 case AttributeType.FLOAT:
19- type = "Double ";
19+ type = "double ";
2020 break;
2121 case AttributeType.BOOLEAN:
22- type = "Boolean ";
22+ type = "boolean ";
2323 break;
2424 case AttributeType.RELATIONSHIP:
2525 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') {
2727 type = "List< " + type + ">";
2828 }
2929 break;
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ class JavaScript extends LanguageMeta {
2828 break;
2929 case AttributeType.RELATIONSHIP:
3030 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') {
3232 type = `Array< ${type}>`;
3333 }
3434 break;
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ class Kotlin extends LanguageMeta {
2323 break;
2424 case AttributeType.RELATIONSHIP:
2525 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') {
2727 type = `List< ${type}>`;
2828 }
2929 break;
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ class PHP extends LanguageMeta {
2626 break;
2727 case AttributeType.RELATIONSHIP:
2828 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') {
3030 type = "array";
3131 }
3232 break;
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ class Swift extends LanguageMeta {
2323 break;
2424 case AttributeType.RELATIONSHIP:
2525 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') {
2727 type = `[${type}]`;
2828 }
2929 break;
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ class TypeScript extends LanguageMeta {
2828 break;
2929 case AttributeType.RELATIONSHIP:
3030 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') {
3232 type = `${type}[]`;
3333 }
3434 break;
You can’t perform that action at this time.
0 commit comments