I want to reproduce a query where the values are the result of a select in typeorm.
The query i want to reproduce is the one i provide here, but i can't find anything in typeorm documentation.
(Isnt important what the query does for the answer, i only need to know how to write that "SELECT
" in typeorm)
INSERT INTO `furgpezzo`(`giacenza`, `giacenzaMin`, `pezzoBarcode`, `furgoneTarga`, `invStandardId`)
select '0', '5', '234234234234', f.`furgoneTarga`, '1'
from `furgpezzo` f
where f.`invStandardId` = '1'
group by f.`furgoneTarga`
something like:
(Edit:)
return await this.dmDatabase.getRepository(FurgPezzo)
.createQueryBuilder()
.insert()
.into(FurgPezzo)
.values( //here put my select )