Skip to content

Why should every ObjectId's be found in sample datas ? #1269

@VierenV

Description

@VierenV

Hello,

I have some issues customizing collections with importField. I have 2 environments, staging and production. Models are the same on those environment, however on nodeJS server start, the agent doesn't find the same schema of the database. The production version is missing some relations between collections. I dug to find that we are looking to cover every ObjectId found in the sample data.
However from my understanding, the sample data are way to thin to have every relations as our database is close to 5k documents by collection.

return [...node.referenceSamples].every(sample => found.has(this.toString(sample)));

I replaced every() by some() as we can not have collision on our ObjectIds in multiple collections and it works way better. Do you think it is something that could be in a next release ?

Thank you

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions