Commit 87ab7f87 authored by nanahira's avatar nanahira

findAllPlain

parent af55e75d
Pipeline #9319 passed with stages
in 57 seconds
import { ConsoleLogger } from '@nestjs/common';
import { ClassConstructor } from 'class-transformer';
import { ClassConstructor, plainToClass } from 'class-transformer';
import {
DeleteResult,
FindConditions,
......@@ -203,6 +203,17 @@ export class CrudBase<
}
}
async findAllPlain(
ent?: Partial<T>,
extraQuery: (qb: SelectQueryBuilder<T>) => void = () => {},
) {
const queryEnt = plainToClass(this.entityClass, ent, {
groups: ['r'],
enableImplicitConversion: true,
});
return this.findAll(queryEnt, extraQuery);
}
async update(
id: EntityId<T>,
entPart: Partial<T>,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment