{"version":3,"sources":["../../src/error/MissingJoinTableError.ts"],"names":[],"mappings":";;;AAGA;GACG;AACH;IAA2C,iDAAK;IAG5C,+BAAY,cAA8B,EAAE,QAA0B;QAAtE,YACI,iBAAO,SAWV;QAdD,UAAI,GAAG,uBAAuB,CAAC;QAI3B,MAAM,CAAC,cAAc,CAAC,KAAI,EAAE,qBAAqB,CAAC,SAAS,CAAC,CAAC;QAE7D,IAAI,QAAQ,CAAC,eAAe,EAAE;YAC1B,KAAI,CAAC,OAAO,GAAG,2CAAyC,cAAc,CAAC,IAAI,SAAI,QAAQ,CAAC,YAAY,UAAO;iBACpG,QAAQ,CAAC,qBAAqB,CAAC,IAAI,SAAI,QAAQ,CAAC,eAAe,CAAC,YAAY,iCAA8B,CAAA;gBAC7G,0DAA0D,CAAC;SAClE;aAAM;YACH,KAAI,CAAC,OAAO,GAAG,6BAA2B,cAAc,CAAC,IAAI,SAAI,QAAQ,CAAC,YAAY,iCAA8B;gBAChH,4CAA4C,CAAC;SACpD;;IACL,CAAC;IAEL,4BAAC;AAAD,CAjBA,AAiBC,CAjB0C,KAAK,GAiB/C;AAjBY,sDAAqB","file":"MissingJoinTableError.js","sourcesContent":["import {EntityMetadata} from \"../metadata/EntityMetadata\";\nimport {RelationMetadata} from \"../metadata/RelationMetadata\";\n\n/**\n */\nexport class MissingJoinTableError extends Error {\n name = \"MissingJoinTableError\";\n\n constructor(entityMetadata: EntityMetadata, relation: RelationMetadata) {\n super();\n Object.setPrototypeOf(this, MissingJoinTableError.prototype);\n\n if (relation.inverseRelation) {\n this.message = `JoinTable is missing on both sides of ${entityMetadata.name}#${relation.propertyName} and ` +\n `${relation.inverseEntityMetadata.name}#${relation.inverseRelation.propertyName} many-to-many relationship. ` +\n `You need to put decorator decorator on one of the sides.`;\n } else {\n this.message = `JoinTable is missing on ${entityMetadata.name}#${relation.propertyName} many-to-many relationship. ` +\n `You need to put JoinTable decorator on it.`;\n }\n }\n\n}"],"sourceRoot":".."}
|