balderdashy / balderdashy/sails

How to import json data into the mongodb with key through sails js

Open
#6,950 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

mongo orm question resolved
Dominant language
JavaScript
Stars
22.8k
Forks
1.9k
PR merge metrics
No merged PRs in 30d

Description

"sails": "^1.2.3",
"sails-hook-grunt": "^4.0.0",
"sails-hook-orm": "^2.1.1",
"sails-hook-sockets": "^2.0.0",
"sails-mongo": "^1.1.0",

I'm trying to import the language list json data into the mongodb with key through sails js.
But something is went wrong. I attached my snapshot of the code.

Language

The collection is created in the database. But the values are null in the database.
Like this...
{
"ts": 1581942054,
"success": true,
"error": false,
"data": {
"createdAt": 1581942052049,
"updatedAt": 1581942052049,
"id": "5e4a85241c6baa4ed0e8e229",
"languageCode": "",
"languageName": "",
"nativeName": "",
"userId": null,
"createdBy": null,
"updatedBy": null,
"deletedBy": null
}
}

Please help me out from this....

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the attached code snapshot and the Sails model/import path described in the issue; no repository files or tests are named. Reproduce the import with the supplied language JSON and compare the input fields with the stored document; done means the language fields are persisted with their intended values instead of empty strings or nulls.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, mongodb
Domain
databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.