Fix relation creation (#10171)

## Context
We recently introduced a createMany on the field metadata service to
improve seeding performances. This broke relation metadata creation
because it was using a method with the same name that was inherited from
TypeOrmQueryService.
This commit is contained in:
Weiko
2025-02-12 18:49:26 +01:00
committed by GitHub
parent 0609b31c64
commit 61881d6d0f
3 changed files with 49 additions and 4 deletions

View File

@ -18,6 +18,33 @@ const jestConfig: JestConfigWithTsJest = {
globalTeardown: '<rootDir>/test/integration/utils/teardown-test.ts',
testTimeout: 15000,
maxWorkers: 1,
transform: {
'^.+\\.(t|j)s$': [
'@swc/jest',
{
jsc: {
parser: {
syntax: 'typescript',
tsx: false,
decorators: true,
},
transform: {
decoratorMetadata: true,
},
experimental: {
plugins: [
[
'@lingui/swc-plugin',
{
stripNonEssentialFields: false,
},
],
],
},
},
},
],
},
moduleNameMapper: {
...pathsToModuleNameMapper(tsConfig.compilerOptions.paths, {
prefix: '<rootDir>/../..',
@ -29,9 +56,6 @@ const jestConfig: JestConfigWithTsJest = {
fakeTimers: {
enableGlobally: true,
},
transform: {
'^.+\\.(t|j)s$': 'ts-jest',
},
globals: {
APP_PORT: 4000,
ACCESS_TOKEN:

View File

@ -93,7 +93,7 @@ export class RelationMetadataService extends TypeOrmQueryService<RelationMetadat
const toId = uuidV4();
const createdRelationFieldsMetadata =
await this.fieldMetadataService.createMany([
await this.fieldMetadataRepository.save([
this.createFieldMetadataForRelationMetadata(
relationMetadataInput,
'from',