typeorm
Version:
Data-Mapper ORM for TypeScript and ES2021+. Supports MySQL/MariaDB, PostgreSQL, MS SQL Server, Oracle, SAP HANA, SQLite, MongoDB databases.
20 lines (18 loc) • 865 B
JavaScript
import { TypeORMError } from "./TypeORMError";
export class MissingJoinColumnError extends TypeORMError {
constructor(entityMetadata, relation) {
super();
if (relation.inverseRelation) {
this.message =
`JoinColumn is missing on both sides of ${entityMetadata.name}#${relation.propertyName} and ` +
`${relation.inverseEntityMetadata.name}#${relation.inverseRelation.propertyName} one-to-one relationship. ` +
`You need to put JoinColumn decorator on one of the sides.`;
}
else {
this.message =
`JoinColumn is missing on ${entityMetadata.name}#${relation.propertyName} one-to-one relationship. ` +
`You need to put JoinColumn decorator on it.`;
}
}
}
//# sourceMappingURL=MissingJoinColumnError.js.map