{"id":15190550,"url":"https://github.com/sanengineer/nodejs-mongoose-1on1","last_synced_at":"2026-01-29T11:40:13.996Z","repository":{"id":144044382,"uuid":"303587166","full_name":"sanengineer/nodejs-mongoose-1on1","owner":"sanengineer","description":"Create One on One Relationship MongoDB with NodeJS and Mongoose.","archived":false,"fork":false,"pushed_at":"2020-10-16T12:35:40.000Z","size":1519,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-06T16:47:02.628Z","etag":null,"topics":["mongodb","mongodb-database","mongoose","mongoose-js","mongoose-schema","nodejs","nodejs-framework","nodejs-mongodb","oneonone","relationships"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sanengineer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-10-13T04:24:33.000Z","updated_at":"2020-10-16T12:35:42.000Z","dependencies_parsed_at":null,"dependency_job_id":"6e5ccd87-42f8-47fd-a646-601927ff1d97","html_url":"https://github.com/sanengineer/nodejs-mongoose-1on1","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sanengineer/nodejs-mongoose-1on1","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sanengineer%2Fnodejs-mongoose-1on1","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sanengineer%2Fnodejs-mongoose-1on1/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sanengineer%2Fnodejs-mongoose-1on1/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sanengineer%2Fnodejs-mongoose-1on1/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sanengineer","download_url":"https://codeload.github.com/sanengineer/nodejs-mongoose-1on1/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sanengineer%2Fnodejs-mongoose-1on1/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28876766,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-29T10:31:27.438Z","status":"ssl_error","status_checked_at":"2026-01-29T10:31:01.017Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["mongodb","mongodb-database","mongoose","mongoose-js","mongoose-schema","nodejs","nodejs-framework","nodejs-mongodb","oneonone","relationships"],"created_at":"2024-09-27T20:41:37.790Z","updated_at":"2026-01-29T11:40:13.978Z","avatar_url":"https://github.com/sanengineer.png","language":"JavaScript","readme":"# Create One To One Relationship MongoDB With NodeJS and Mongoose\n![ER Diagram One to One Relationship MongoDB with Mongoose and NodeJS](https://res.cloudinary.com/dsv9w1ey3/image/upload/v1602577764/github-images/ER_Diagram_MongoDB_One-to-One_Relationships_m0ex2w.png)\n\n# Data Base Input \nChange value of key database on server.js\n\nExample: \n\n    For Brand Table :\n    {\n        name: \"Microsoft\"\n    }\n\n    For Device Table :\n\n    {\n        name: \"Surface Book\"\n        storage: \"256GB\"\n        color: \"Grey\"\n        code: 512GB // key code is automatically generated\n        brand: {name: \"Microsoft\"} // automatically by reference on Brand Table\n    }\n\nSo you just change key `name` on **Brand** table, and change keys `name`, `storage`, `color` on **Device** table.\n## Run Code\n    $ cd\n    $ npm run dev","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsanengineer%2Fnodejs-mongoose-1on1","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsanengineer%2Fnodejs-mongoose-1on1","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsanengineer%2Fnodejs-mongoose-1on1/lists"}