Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const typeorm_1 = require("typeorm");
const class_transformer_1 = require("class-transformer");
const services_1 = require("@nestjsx/crud/lib/services");
const util_1 = require("@nestjsx/util");
class TypeOrmCrudService extends services_1.CrudService {
constructor(repo) {
super();
this.repo = repo;
this.entityColumnsHash = {};
this.entityRelationsHash = {};
this.onInitMapEntityColumns();
this.onInitMapRelations();
}
get findOne() {
return this.repo.findOne.bind(this.repo);
}
get find() {
return this.repo.find.bind(this.repo);
}
get entityType() {
return this.repo.target;