diff --git a/packages/utils/typescript/lib/generators/common/models/mappers.js b/packages/utils/typescript/lib/generators/common/models/mappers.js index 43bfe51da4..0f135e8ea6 100644 --- a/packages/utils/typescript/lib/generators/common/models/mappers.js +++ b/packages/utils/typescript/lib/generators/common/models/mappers.js @@ -69,7 +69,7 @@ module.exports = { params.push(...targetFieldParams); // If the options property is defined, transform it to - // a type literral node and add it to the params list + // a type literal node and add it to the params list if (_.isObject(options)) { params.push(toTypeLiteral(options)); } @@ -93,25 +93,18 @@ module.exports = { media() { return [withAttributeNamespace('Media')]; }, - relation({ uid, attribute }) { + relation({ attribute }) { const { relation, target } = attribute; const isMorphRelation = relation.toLowerCase().includes('morph'); if (isMorphRelation) { - return [ - withAttributeNamespace('Relation'), - [factory.createStringLiteral(uid, true), factory.createStringLiteral(relation, true)], - ]; + return [withAttributeNamespace('Relation'), [factory.createStringLiteral(relation, true)]]; } return [ withAttributeNamespace('Relation'), - [ - factory.createStringLiteral(uid, true), - factory.createStringLiteral(relation, true), - factory.createStringLiteral(target, true), - ], + [factory.createStringLiteral(relation, true), factory.createStringLiteral(target, true)], ]; }, component({ attribute }) {