fix(medusa): Use query relation load strategy on Products (#3926)
* fix(medusa): products retrieve uses query strategy for performance * chore: packaged version of medusa typeorm fix * chore: update path * chore: stock locations uses typeorm version * chore: resolve typeorm to medusa package * chore: Update medusa project in CI action * chore: temp disable transaction timeout for plugins --------- Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com> Co-authored-by: olivermrbl <oliver@mrbltech.com>
This commit is contained in:
co-authored by
Oliver Windall Juhl
olivermrbl
parent
c04cbbaa1b
commit
4e8045a0ac
@@ -72,7 +72,10 @@ export const ProductRepository = dataSource.getRepository(Product).extend({
|
||||
async findOne(
|
||||
options: ExtendedFindConfig<Product & ProductFilterOptions>
|
||||
): Promise<Product | null> {
|
||||
const queryBuilder = await this.prepareQueryBuilder_(options)
|
||||
const options_ = { ...options }
|
||||
options_.relationLoadStrategy = "query"
|
||||
|
||||
const queryBuilder = await this.prepareQueryBuilder_(options_)
|
||||
return await queryBuilder.getOne()
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user