Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Cannot delete property 'socketPath' of [object Object] #4891

Closed
3hson opened this issue Nov 2, 2023 · 0 comments
Closed

Error: Cannot delete property 'socketPath' of [object Object] #4891

3hson opened this issue Nov 2, 2023 · 0 comments

Comments

@3hson
Copy link

3hson commented Nov 2, 2023

Describe the bug
using mongo when is ignoreUndefinedInQuery: true is added to query i randomly face following error in find queries

Stack trace

TypeError: Cannot delete property 'socketPath' of [object Object]
    at X/node_modules/@mikro-orm/core/utils/Utils.js:191:26
    at Array.forEach (<anonymous>)
    at Function.dropUndefinedProperties (X/node_modules/@mikro-orm/core/utils/Utils.js:189:24)
    at X/node_modules/@mikro-orm/core/utils/Utils.js:183:46
    at Array.forEach (<anonymous>)
    at Function.dropUndefinedProperties (X/node_modules/@mikro-orm/core/utils/Utils.js:183:22)
    at X/node_modules/@mikro-orm/core/utils/Utils.js:194:19
    at Array.forEach (<anonymous>)
    at Function.dropUndefinedProperties (X/node_modules/@mikro-orm/core/utils/Utils.js:189:24)
    at X/node_modules/@mikro-orm/core/utils/Utils.js:194:19
    at Array.forEach (<anonymous>)
    at Function.dropUndefinedProperties (X/node_modules/@mikro-orm/core/utils/Utils.js:189:24)
    at X/node_modules/@mikro-orm/core/utils/Utils.js:194:19
    at Array.forEach (<anonymous>)

To Reproduce
my config

const mikroOrmConfig = defineConfig({
  type: 'mongo',
  entities: ['dist/src/**/*.entity.js'],
  entitiesTs: ['src/**/*.entity.ts'],
  metadataProvider: ReflectMetadataProvider,
  clientUrl,
  debug: true,
  highlighter: new MongoHighlighter(),
  logger: logger.log.bind(logger),
  extensions: [Migrator, EntityGenerator, SeedManager],
  seeder: {
    path: 'dist/seeders',
    pathTs: 'src/seeders',
  },
  migrations: { transactional: false },
  ignoreUndefinedInQuery: true,
});

Versions

Dependency Version
node 20
typescript 5.2.2
mikro-orm 5.9.0
your-driver mongodb
@B4nan B4nan closed this as completed in cef26c5 Nov 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant