title: Cast to ObjectID failed for value \"In\" at path \"c_id\"",
body: <p>I created one collection and that value Stored in mongodb like below.this is country collection</p>
  
  <pre><code> "_id" : ObjectId("5b851243c8352016e4b70d36"),
   "is_active" : true,
   "country_code" : "IND",
   "country_name" : "India ",
   "__v" : 0
  </code></pre>
  
  <p>I want to create state collection using country collection like below</p>
  
  <pre><code>"_id" : ObjectId("5b852a6e91088217804a1996"),
   "is_active" : true,
   "country_id" : "India",[here i want to fetch country collection _id(objectId)]
   "state_code" : "KA",
   "state_name" : "Karnataka",
   "__v" : 0
  </code></pre>
  
  <p>state.js:</p>
  
  <pre><code>const mongoose = require('mongoose');
  const Schema = mongoose.Schema;
  var ObjectId = require('mongoose').Types.ObjectId
  
  const State = new Schema({
      country_id:{
          type: mongoose.Schema.Types.ObjectId,
          ref:'Country'
      },
      state_code:String,
      state_name:String,
      is_active:{ type: Boolean, default:true, required: true },
  
  });
  
  module.exports = mongoose.model('State',State);
  </code></pre>
  
  <p>when i pass the values from postman i am getting error like below</p>
  
  <pre><code>"name": "CastError",
                  "stringValue": "\"India\"",
                  "kind": "ObjectID",
                  "value": "India",
                  "path": "country_id",
  </code></pre>
  
  <p>I am passing req.body has like below</p>
  
  <pre><code>"country_id":"India",
  "state_code":"KA",
   "state_name":"Karnataka",
    "is_active":true,
  </code></pre>
  
  <p>Is there any way to definr or access foreign key in mongodb?I searched everywhere still i am getting the error   </p>