Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

151
Views
"No se admite el relleno de nulos en una matriz de enlaces" MongoDB / Realm

cuando trato de agregar nuevos elementos a una matriz dentro de un documento, aparece este error. Hasta donde yo sé, las referencias de elementos existen en la base de datos de MongoDB.

El error que obtengo es:

 [ "To resolve this issue please update or replace the document in MongoDB to make sure it abides by the schema.", "Change Event Type: update", "Namespace: app.CompanyLocation", "Partition: dag1f7g7102aecdd3e9467711e", "Document ID: ObjectID(\"61f7f74a2aecdd3e9467711f\")", "Detailed Error: cannot insert link at index 7 of array at path { table: \"CompanyLocation\", fullPath: \"units\" }, array has 6 elements and backfilling nulls in array of links are not supported", "Number of Unsyncable Documents: 1" ]

El código que causa el error es:

 const newUnits = result.Shipment.Units[0].Unit.map(u => u._attributes.UID + u._attributes.PSN).flat(); console.log(newUnits); if(importResult.success){ // Lägg till den som inventory på platsen. context.services.get("mongodb-atlas") .db("app") .collection("CompanyLocation") .updateOne( { _id: new BSON.ObjectId(place), _partition: partition}, { $push: { units: { $each: newUnits } } } ) console.log(newUnits); }

Mi pregunta es: ¿Qué puede estar causando esto y qué significa el mensaje de error?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Parece que este es un problema con la versión 5 de MongoDB. Se encontraron discusiones y respuestas en el foro de la comunidad de MongoDB: https://www.mongodb.com/community/forums/t/cannot-insert-link-at-index-7- of-array-at-path-table-companylocation-fullpath-units-array-ha-6-elements-and-backfilling-nulls-in-array-of-links-no-son-compatibles/151342

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!