'TypeORM insert using query builder and get entity back

I need to insert an entity using Entity.createQueryBuilder() and get the entity back as one query. .raw returns only excluded fields for some reason and I want the opposite: I want to get the entity with all @Exclude-d fields excluded and others present. How to do this without making a separate query? I know about .returning, but I don't want to manually specify all the fields that I need. Maybe there's something like .returnAllExceptExcluded?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source